[Cuis-dev] denormals

Luciano Notarfrancesco luchiano at gmail.com
Thu Nov 20 10:00:31 PST 2025


It seems to me that when working with floats in Cuis we should try to avoid
denormals (or subnormals, i.e. floats that are very close to 0 but not 0).
They used to be slower than other floats in old CPUs, and they are not so
much of a problem anymore in modern CPUs, but I think they would still be
problematic in Cuis because they turn into BoxedFloat64 (instead of
SmallFloat64). What’s the best way to handle them? For the time being I
implemented BoxedFloat64>>undenormalized as:
    self isDenormalized ifTrue: [^ 0.0]
and in Float just returns self. The method isDenormalized comes in the base
image, but it’s not super fast. Is there a better way to do it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251121/15d05e85/attachment.htm>


More information about the Cuis-dev mailing list