[SciPy-user] special.round(10.5) [was: Installing SciPy on Mac
OS X Tiger]
Fernando.Perez at colorado.edu
Tue Jun 14 16:47:29 CDT 2005
Robert Kern wrote:
>>What should we do here?
> Figure out why cephes' round doesn't behave as documented on your machine.
> In : scipy.special.round?
> Type: ufunc
> String Form: <ufunc 'round'>
> Namespace: Interactive
> y=Returns the nearest integer to x as a double precision
> floating point result. If x ends in 0.5 exactly, the
> nearest even integer is chosen.
> Can you compile the attached C program and give the results (you might
> need -lm to link)? On my Mac, I get:
> [~] kern$ ./testround
> 10.4 -> 10
> 10.5 -> 10
> 10.6 -> 11
> 11.4 -> 11
> 11.5 -> 12
> 11.6 -> 12
calderon[round]> gcc -lm testround.c -o testround
10.4 -> 10
10.5 -> 10
10.6 -> 11
11.4 -> 11
11.5 -> 12
11.6 -> 12
Same as on yours...
This is gcc on my box:
calderon[round]> gcc --version
gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
Copyright (C) 2004 Free Software Foundation, Inc.
Well, I'll live with that failure for now. I just had a hard disk die,
so I'm going to have to deal with that.
BTW, if you have any complaints on my patch from this morning, let me
know. Otherwise, I can commit all that later. I also fixed all the
spurious gcc warnings which were being caused by blitz/array.h showing
up before Python.h in the weave-generated sources. At python-dev, they
pointed me to the refs where they sternly warn against any header
pulling in system headers before Python.h. I fixed the weave
header-generation code and also fastumath.c by hand to avoid this.
If you're OK, I can commit all that later.
More information about the SciPy-user