When will you implement cent and ucent?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Mar 29 15:23:45 UTC 2022


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

-- 
Error: Keyboard not attached. Press F1 to continue. -- Yoon Ha Lee, CONLANG


More information about the Digitalmars-d mailing list