Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/compiler/common/rational.sml
ViewVC logotype

Diff of /trunk/src/compiler/common/rational.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 115, Wed Jun 23 22:01:49 2010 UTC revision 116, Thu Jun 24 13:43:16 2010 UTC
# Line 78  Line 78 
78            val a2 = d1 div d            val a2 = d1 div d
79            val lcm = a1 * d1            val lcm = a1 * d1
80            in            in
81              mkRat (a2*n1 + a1*n1, lcm)              mkRat (a1*n1 + a2*n2, lcm)
82            end            end
83    
84      fun sub (R{num=n1, denom=d1}, R{num=n2, denom=d2}) = let      fun sub (R{num=n1, denom=d1}, R{num=n2, denom=d2}) = let
# Line 87  Line 87 
87            val a2 = d1 div d            val a2 = d1 div d
88            val lcm = a1 * d1            val lcm = a1 * d1
89            in            in
90              mkRat (a2*n1 - a1*n1, lcm)              mkRat (a1*n1 - a2*n2, lcm)
91            end            end
92    
93      fun mul (R{num=n1, denom=d1}, R{num=n2, denom=d2}) =      fun mul (R{num=n1, denom=d1}, R{num=n2, denom=d2}) =

Legend:
Removed from v.115  
changed lines
  Added in v.116

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0