From 5adf009cb09295893e6bb01b4666a569590e0f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 30 Nov 2011 14:30:31 +0100 Subject: compiler: Turn calls to math:pi/0 into constant values Mark math:pi/0 as pure, informing the compiler that the value can be calculated at compile time. --- lib/compiler/src/erl_bifs.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/compiler/src/erl_bifs.erl') diff --git a/lib/compiler/src/erl_bifs.erl b/lib/compiler/src/erl_bifs.erl index 2514c06360..f82a798ceb 100644 --- a/lib/compiler/src/erl_bifs.erl +++ b/lib/compiler/src/erl_bifs.erl @@ -136,6 +136,7 @@ is_pure(math, sinh, 1) -> true; is_pure(math, sqrt, 1) -> true; is_pure(math, tan, 1) -> true; is_pure(math, tanh, 1) -> true; +is_pure(math, pi, 0) -> true; is_pure(_, _, _) -> false. -- cgit v1.2.3