Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/MiscUtil/profile/profile.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/MiscUtil/profile/profile.sml

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

revision 829, Mon May 14 15:30:56 2001 UTC revision 830, Tue May 15 19:48:17 2001 UTC
# Line 71  Line 71 
71            (i*j div k)            (i*j div k)
72               handle Overflow => muldiv(i,j div 2, k div 2)               handle Overflow => muldiv(i,j div 2, k div 2)
73    
74        (* This convolution is required because the PPC cannot distinguish
75         * between div-by-zero and overflow -- Lal.
76         *)
77        fun muldiv(i, j, 0) = raise General.Div
78          | muldiv(i, j, k) =
79             (i * j div k) handle Overflow => muldiv(i, j div 2, k div 2)
80    
81      fun decfield(n,j,k,w1,w2) =      fun decfield(n,j,k,w1,w2) =
82            field(decimal(Int.toString (muldiv(n,j,k)),w1)            field(decimal(Int.toString (muldiv(n,j,k)),w1)
83                    handle Div => "",w2)                    handle Div => "",w2)

Legend:
Removed from v.829  
changed lines
  Added in v.830

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