When will you implement cent and ucent?

Abdulhaq alynch4047 at gmail.com
Tue Mar 29 16:21:16 UTC 2022


On Tuesday, 29 March 2022 at 15:23:45 UTC, H. S. Teoh wrote:
> On Tue, Mar 29, 2022 at 01:58:46PM +0000, 12345swordy via 
> Digitalmars-d wrote:
>> On Tuesday, 29 March 2022 at 12:13:31 UTC, Adam D Ruppe wrote:
> [...]
>> > Murilo might not need a big number lib at all.
>> > 
>> > For astronomy, there's a good chance floating point will do 
>> > the job.
>> 
>> That not going to work if you are comparing things that are 
>> extremely big with something that is extremely small here.
> [...]
>
> I think you got that wrong, floating is precisely designed for 
> such comparisons. You can easily compare 1e+1000 with 1e-1000 
> without running into problems.
>
> Where you might run into problems is if you *add* (or subtract) 
> extremely small numbers from extremely big numbers. Or if you 
> divide by extremely small numbers. Or in general perform 
> operations that mix numbers of greatly unlike magnitudes.
>
>
> T

Yes, and Adam did take out a double indemnity with "might not" 
and "good chance". The long dormant physicist in me is curious to 
see an example calculation/formula from Murilo, and his hoped-for 
precision at the end.



More information about the Digitalmars-d mailing list