Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!prism!mailer.cc.fsu.edu!systems!desing From: desing@systems.cs.fsu.edu (Fred Desing) Newsgroups: comp.lang.rexx Subject: Re: Dollarizing Message-ID: <1991May1.094026.1260@mailer.cc.fsu.edu> Date: 1 May 91 13:53:46 GMT References: <91120.082553CJS@psuvm.psu.edu> <91120.131127NIV@SLACVM.SLAC.STANFORD.EDU> Organization: Florida State University Computing Center Lines: 30 In article <91120.131127NIV@SLACVM.SLAC.STANFORD.EDU> NIV@SLACVM.SLAC.STANFORD.EDU writes: >One really easy thing is > >/* */ >arg x >d = (x%.01)*.01 >r = x//.01 >if r >= .005 then d = d +.01 >say d > >This works well anyplace How about: say trunc(x * 100 + .5) / 100 -- _ /* Fred G. Desing, FSU Computing Center Systems Group \'o.O' Bitnet: desing@fsuavm Internet: desing@avm.cc.fsu.edu =(___)= _____________________________________ U | "Disk space -- the final frontier." | Bill says: |______________________-Anonymous_____| "I think, therefore: ackphthh" -- _ /* Fred G. Desing, FSU Computing Center Systems Group \'o.O' Bitnet: desing@fsuavm Internet: desing@avm.cc.fsu.edu =(___)= --------------------------------------------------------- U |"Yea though I walk through the valley of the shadow of | Bill says: | death, I fear no evil. 'Cuz I'm the meanest, sneakiest | --------->> | most underhanded son-of-a-bitch in the whole valley." |