aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/erl_bifs.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-30 14:30:31 +0100
committerBjörn Gustavsson <[email protected]>2011-11-30 15:03:30 +0100
commit5adf009cb09295893e6bb01b4666a569590e0f19 (patch)
tree9472d7706fd7733104539114827f0cc767234474 /lib/compiler/src/erl_bifs.erl
parentc2c93dd69c0d66a836ec938aeabbc7130960e445 (diff)
downloadotp-5adf009cb09295893e6bb01b4666a569590e0f19.tar.gz
otp-5adf009cb09295893e6bb01b4666a569590e0f19.tar.bz2
otp-5adf009cb09295893e6bb01b4666a569590e0f19.zip
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.
Diffstat (limited to 'lib/compiler/src/erl_bifs.erl')
-rw-r--r--lib/compiler/src/erl_bifs.erl1
1 files changed, 1 insertions, 0 deletions
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.