[pure-lang-svn] SF.net SVN: pure-lang: [355] pure/trunk/lib/math.pure
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-07-01 14:50:05
|
Revision: 355 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=355&view=rev Author: agraef Date: 2008-07-01 07:50:04 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Add Euler's number. Modified Paths: -------------- pure/trunk/lib/math.pure Modified: pure/trunk/lib/math.pure =================================================================== --- pure/trunk/lib/math.pure 2008-07-01 14:07:14 UTC (rev 354) +++ pure/trunk/lib/math.pure 2008-07-01 14:50:04 UTC (rev 355) @@ -70,6 +70,10 @@ ln x::int | ln x::bigint = ln (double x); log x::int | log x::bigint = log (double x); +/* Euler's number. */ + +def e = exp 1.0; + /* Trigonometric functions. */ extern double sin(double), double cos(double), double tan(double); @@ -89,6 +93,8 @@ atan2 x::int y::double | atan2 x::bigint y::double = atan2 (double x) y; atan2 x::double y::int | atan2 x::double y::bigint = atan2 x (double y); +/* Ludolph's number. */ + def pi = 4.0*atan 1.0; /* Hyperbolic functions. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |