libm update plans?
Erik Wikström
erik-wikstrom at telia.com
Mon May 7 09:17:44 PDT 2007
On 2007-05-07 16:45, Matthew Dillon wrote:
:3) port over myself (see #1, #2 :)
:
:Thanks,
:
:- Chris
Hmmm.
I looked for various pieces of example code. FreeBSD has a really
old implementation in (libmsun) which is not suitable, and NetBSD uses
the same implementation. Gnu seems to have a clean 4-line implementation
done in 2005:
http://gcc.gnu.org/ml/fortran/2005-05/msg00227.html
But I'd like to find an unadulterated version if possible (though
presumably it is simple enough that it pretty much has to be done
that way regardless).
I'm a little concerned that there are so few implementations around.
Are you sure this is part of C99?
Yes it it, section 7.12.9.8: "The trunc functions round their argument
to the integer value, in floating format, nearest to but no larger in
magnitude than the argument."
I've never been an assembly programmer but it seems to me like there
should be some instruction for this kind of thing.
--
Erik Wikström
More information about the Users
mailing list