Author: larry
Date: Fri Mar 16 09:31:56 2007
New Revision: 14352

Modified:
   doc/trunk/design/syn/S02.pod
   doc/trunk/design/syn/S03.pod

Log:
The ratio type is now a noun, not an adjective.
No longer spec that / must pragmatically produce a Rat.
Instead, Int div Int is now guaranteed to return a Rat.
An integerized Rat is a truncated Rat.


Modified: doc/trunk/design/syn/S02.pod
==============================================================================
--- doc/trunk/design/syn/S02.pod        (original)
+++ doc/trunk/design/syn/S02.pod        Fri Mar 16 09:31:56 2007
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 10 Aug 2004
-  Last Modified: 15 Mar 2007
+  Last Modified: 16 Mar 2007
   Number: 2
-  Version: 99
+  Version: 100
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -543,13 +543,13 @@
 to arbitrary precision, as well as holding C<Inf> and C<NaN> values.
 
 (C<Num> may support arbitrary-precision floating-point arithmetic, but
-is not required to unless we can do so portably and efficiently.  Num
+is not required to unless we can do so portably and efficiently.  C<Num>
 must support the largest native floating point format that runs at full speed.)
 
-C<Rational> supports arbitrary precision rational arithmetic.  However,
-dividing two C<Int> objects produces fractionals as C<Num> objects by
-default, not C<Rational> objects.  You can override this behavior with
-a pragma.
+C<Rat> supports arbitrary precision rational arithmetic.  However,
+dividing two C<Int> objects using C<< infix:</> >> produces a
+fraction of C<Num> type, not a ratio.  You can produce a ratio by
+using C<infix:<div> >> on two integers instead.
 
 Lower-case types like C<int> and C<num> imply the native
 machine representation for integers and floating-point numbers,

Modified: doc/trunk/design/syn/S03.pod
==============================================================================
--- doc/trunk/design/syn/S03.pod        (original)
+++ doc/trunk/design/syn/S03.pod        Fri Mar 16 09:31:56 2007
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 8 Mar 2004
-  Last Modified: 13 Mar 2007
+  Last Modified: 16 Mar 2007
   Number: 3
-  Version: 109
+  Version: 110
 
 =head1 Overview
 
@@ -513,7 +513,7 @@
 
     $numerator div $denominator
 
-Dispatches to the infix:<div> multi most appropriate to the operand
+Dispatches to the C<< infix:<div> >> multi most appropriate to the operand
 types.  Policy on what to do about division by zero is up to the type,
 but for the sake of hyperoperators and junctions those types that
 can represent overflow (or that can contain an unthrown exception)
@@ -522,6 +522,9 @@
 use in hyperops and junctions, and whether they can profitably benefit
 from a lazy exception model.)
 
+Use of C<div> on two C<Int> values results in a ratio of the C<Rat> type.
+Integerizing a rat involves truncating its tail.
+
 =item *
 
 infix:<%>, modulus

Reply via email to