Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 12 Aug 2012 14:40:22 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Priorities for next release?

* Rich Felker <dalias@...ifal.cx> [2012-08-11 18:25:22 -0400]:
> Actually not quite as easy as I thought. Do we also want the float and
> ld versions? And how are they supposed to behave on inf/nan? I think

bsd only seem to have significand and significandf
so no ld version

actually the same is true for scalb
(musl declares scalbl but only defines
scalb and scalbf, so i guess scalbl can
be reomved from math.h)

> an optimal implementation would be something like:
> 
> if (isnormal(x.d)) return x.rep = (x.rep&mask|exp_0), x.d;
> else return scalbn(x, -ilogb(x));
> 

freebsd just returns scalbn(x, -ilogb(x))
we can do that as well
(eventhough it's not very efficient for normal values)

(the i386 asm version uses fxtract which does the same)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.