This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: numerical instability and estimate-probability


> The frequencies can get very huge, so only sane workaround wihtout FP
> is IMO only inventing the mantisa/exponent at my own :(

Depending on your needs, you can forget the mantissa (magnitude only),
or if you are only adding and have all the counts handy, when you need
to multiply one count and it would be too big, then you divide all
others instead (you keep some ratio as well).

-- 
Laurent Guerby <guerby@acm.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]