[Coco] long math subroutine module?

Aaron Banerjee spam_proof at verizon.net
Thu Apr 12 13:21:32 EDT 2012


I wrote a "print" routine for "ultra-high precision" floats (assumes  
that it is 1.x where "x" has 32 bits of precision).  It was for a  
special purpose program and I don't know if it would be of any use,  
but if you think it is, I'll send it.  It will provide a decimal print  
of the number...
             - Aaron

On Apr 11, 2012, at 11:31 PM, gene heskett wrote:

> On Wednesday, April 11, 2012 11:25:16 PM Willard Goosey did opine:
>
>> Has anyone written a long (32-bit) integer math subroutine module for
>> BASIC-09?  I'm thinking something that uses a record of 2 integers
>> (like some of the syscalls want) for each argument.  Something  
>> like...
>>
>> arg1.hi=1
>> arg1.lo=63000
>> arg2.hi=0
>> arg2.lo=2
>> run longmath("*",arg1,arg2,arg3)
>> (*result in arg3*)
>>
>> ?????
>> Willard
>
> So far as I have heard about, no.  I believe the real problem is the  
> size
> of an int in basic09 is 16 bits & even a real is only 5 bytes  
> including the
> exponent.
>
> I believe if you need that in long or double, you'll need to write  
> it in C
> and use the trig.l to get those functions where the accuracy only gets
> fuzzy about 16 or 17 digits out.  They work well until the julian  
> calender
> hits zero in the middle of 4713 BC.
>
> Cheers, Gene
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> My web page: <http://coyoteden.dyndns-free.com:85/gene>
> The absurd is the essential concept and the first truth.
> 		-- A. Camus
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco




More information about the Coco mailing list