Re: libm update plans?

2007-05-10 Thread Simon corecode Schubert
+++ Chris Turner [09/05/07 20:36 -0400]:
> > Maybe you should pick up DragonFly C99 Standards Conformance Project? ;)
> > 
> > http://www.in-nomine.org/~asmodai/df/conformance/
> like I said.. wayyy down the list for me..
> 
> good to know this page exists though..

this page is outdated and is not being maintained.  please avoid
referring/linking to it.

cheers
  simon

-- 
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /"\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


Re: libm update plans?

2007-05-09 Thread Chris Turner
Hasso Tepper wrote:

> Maybe you should pick up DragonFly C99 Standards Conformance Project? ;)
> 
> http://www.in-nomine.org/~asmodai/df/conformance/
> 
> 

gak!

wheres the trunc() ?

like I said.. wayyy down the list for me..

good to know this page exists though..




Re: libm update plans?

2007-05-09 Thread Hasso Tepper
Chris Turner wrote:
> Simon corecode Schubert wrote:
> > 
> > yes, maybe you can post your analysis to bugs@ so that it gets recorded.
> > 
> 
> okay.. all set.

Maybe you should pick up DragonFly C99 Standards Conformance Project? ;)

http://www.in-nomine.org/~asmodai/df/conformance/


-- 
Hasso Tepper


Re: libm update plans?

2007-05-08 Thread Chris Turner
Simon corecode Schubert wrote:
> 
> yes, maybe you can post your analysis to bugs@ so that it gets recorded.
> 

okay.. all set.

I hereby wash my hands of this,
at least until it comes back to haunt me later :)





Re: libm update plans?

2007-05-08 Thread Simon corecode Schubert
+++ Chris Turner [07/05/07 21:35 -0400]:
> Let me know if I should file a bug or similar to track things,
> otherwise I'll probably leave in the back of my mind to gather dust.

yes, maybe you can post your analysis to bugs@ so that it gets recorded.

cheers
  simon

-- 
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /"\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


Re: libm update plans?

2007-05-07 Thread Chris Turner
Matthew Dillon wrote:

> 
> 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

1) haven't read this yet, to keep ye-olde eyes clean :)
2) just assumed that since DF was rebasing things from netbsd
   (based on df commit messages), that this was added new after the fact

good summary of netbsd's changes here:

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/shlib_version

although based on a quick glance at:

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/src/s_floor.c
($NetBSD$ v1.11)

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/src/s_trunc.c

($NetBSD$ v1.2)

http://www.netlib.org/fdlibm/fdlibm.h

( /* @(#)fdlibm.h 1.5 04/04/22 */ )

and

http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/msun/src/s_trunc.c

($FreeBSD$ v1.1)

It looks like this was a fresh implementeation for FBSD 5 using
a similar structure (and misnamed header) from the s_floor.c
brought in to netbsd since 3.x release

aside from all the various conditionals, length, and so on,
what do you find unsuitable about this version?

gak!

the whole point of mentioning it was so I didn't spend hours doing
this ^ .. oh well. that's what I get for being lazy - hopefully some
good will come of it.

>
> Are you sure this is part of C99?

was shamefully baseing this off of the GNU manpage on a linux box
(hence '?')..  anyhoo, someone did the real homework here..

Like I mentioned, this is further down in my list of priorities at the
moment (e.g. not-started external vkernel shutdown & other ideas, etc
much more fun) ..

Let me know if I should file a bug or similar to track things,
otherwise I'll probably leave in the back of my mind to gather dust.

Thanks,

- Chris










Re: libm update plans?

2007-05-07 Thread Joerg Sonnenberger
On Mon, May 07, 2007 at 06:17:44PM +0200, Erik Wikström wrote:
> I've never been an assembly programmer but it seems to me like there 
> should be some instruction for this kind of thing.

By changing the rounding mode, which in general is quite expensive and
often not worse it. Note that it is the same as floor/ceil + condition.

Joerg


Re: libm update plans?

2007-05-07 Thread Erik Wikström

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


Re: libm update plans?

2007-05-07 Thread Petr Janda

Matthew Dillon wrote:

unadulterated version


LOL ?





Re: libm update plans?

2007-05-07 Thread Matthew Dillon

: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?

-Matt
Matthew Dillon 
<[EMAIL PROTECTED]>


libm update plans?

2007-05-05 Thread Chris Turner

Cheers all..

The masochist in me was trying to get some mildly glibc specific
sound apps to run on df, and discovered that the C99? 'trunc'
function has not yet been ported over from NetBSD's math library

This leaves me with 4 options:

1) whine here to ask if anyone has any update plans:

   "waah! Does anyone have any update plans?"

   from digging around it looks like trunc() is in NetBSD
   (checked only v1.46 of math.h)

   http://cvsweb.netbsd.org/bsdweb.cgi/src/include/math.h?rev=1.46

2) Hack in a private copy to the particular package in question

   (sheer lazyness!)

3) port over myself (see #1, #2 :)

4) find something else to do for kicks

will probably put this lower in my ever-growing todo list for the moment
if not #1, but just thought I'd ask..

Thanks,

- Chris