Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating very large numbers
Message
From
10/09/2009 01:53:30
 
 
To
09/09/2009 12:14:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01423218
Message ID:
01423395
Views:
50
Thank You :)



>>Dear All
>>
>>Is there any way to make precise calculation without number being rounded
>>
>>? 22919090710007290*100/97
>>
>>Returns rounded number. I need actual remainder.
>>Mod(22919090710007290*100,97) returns 0
>>
>>What are the options.
>>
>>TIA
>>Sergio
>
>with 9223372036854775807 bound you can use this:
>
>
>? ModEx("2291909071000729000",  97)
>? ModEx("2291909071000729100",  97)
>
>FUNCTION ModEx(lcNumber, lnDivisor)
>
>    LOCAL ly
>    ly=CAST(TRANSFORM(m.lcNumber,"@R 999999999999999.9999") AS Y)
>    RETURN ((m.ly-INT(m.ly/m.lnDivisor)*m.lnDivisor)*10000)%m.lnDivisor
>
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform