[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Cobol replacement?



At 03:17 +1000 on 23/10/97, Karsten Meier wrote:
>According to the cited Article

>2. decimal arithmetik

>we need a dezimal module to handle this Point in perl.

Hmm... rather than doing the "multiply by 100" trick, any serious
"decimal_arithmetic.pm" module would probably do tricky stuff like storing
10.3 as "10.3", and implement the addition, subtraction, multiplication and
division routines as BCD style methods...

Okay.. we're off topic now... time to find the address for the Perl mailing
list and news groups...

I can't resist... one problem with decimal arithmetic is the lack of
ability to represent odd fractions (or whatever the mathematical term is)
such as 1/3. To have "non lossy" arithmetic, one would have to confine
oneself to integer math, fractional math (every number is a compound of
{"numerator"=>5,"denominator"=>6} or {"quotient"=>3,"remainder"=>4}) or
stack-based math (result =
finalise(3,5,"+",10,"x","sqrt","push",4,5,"-","x","pop","sqr","tan",blah,blah,bl
ah) )...

Sorry for wasting your time.
Alex

Windows 95: n. 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch