develooper Front page | perl.perl6.language | Postings from May 2010

r30821 -[spec] Add Real.Int, Real.Rat, Real.Num, and Real.Complex to the spec.

From:
pugs-commits
Date:
May 26, 2010 12:30
Subject:
r30821 -[spec] Add Real.Int, Real.Rat, Real.Num, and Real.Complex to the spec.
Message ID:
20100526192951.17954.qmail@feather.perl6.nl
Author: colomon
Date: 2010-05-26 21:29:50 +0200 (Wed, 26 May 2010)
New Revision: 30821

Modified:
   docs/Perl6/Spec/S32-setting-library/Numeric.pod
Log:
[spec] Add Real.Int, Real.Rat, Real.Num, and Real.Complex to the spec.

Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Numeric.pod	2010-05-26 19:20:46 UTC (rev 30820)
+++ docs/Perl6/Spec/S32-setting-library/Numeric.pod	2010-05-26 19:29:50 UTC (rev 30821)
@@ -19,8 +19,8 @@
 
     Created: 19 Mar 2009 extracted from S29-functions.pod
 
-    Last Modified: 14 May 2010
-    Version: 7
+    Last Modified: 26 May 2010
+    Version: 8
 
 The document is a draft.
 
@@ -174,6 +174,30 @@
 
 =over
 
+=item Int
+
+ our Int multi method Int ()
+
+Converts this C<Real> to an C<Int> as if C<truncate> had been called.
+
+=item Rat
+
+ our Rat multi method Rat ( Real $epsilon = 1.0e-6 )
+
+Converts this C<Real> to a C<Rat> with an accuracy of C<$epsilon>.
+
+=item Num
+
+ our Num multi method Num ()
+
+Converts this C<Real> to a C<Num> as accurately as is possible for a C<Num>.
+
+=item Complex
+
+ our Complex multi method Complex ()
+
+Returns a C<Complex> whose real part is this C<Real> and whose imaginary part is 0.
+
 =item floor
 
  our Int multi method floor ( Real $x: ) is export




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About