#5130: [with patch; positive review] create a prime_pi function that doesn't
just
compute len(prime_range(n))
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-4.0
Component: number theory | Keywords:
---------------------------+------------------------------------------------
Comment(by mabshoff):
Replying to [comment:19 cwitty]:
> I wouldn't worry about the correctness/portability of sqrt_longlong. It
uses sqrt() (not sqrtl()),
Yes, I know. I complained initially about sqrtl() in one of the early
patches which was the reason long long sqrt() was defined.
> which is exactly specified by IEEE floating point (no room for
implementation differences in the spec), so it should be portable; and it
has a built-in self-test, so if something goes wrong we'll get exceptions.
I think my points still stand, i.e.
* There is no reason for the long long sqrt() to be in this file since it
will come in useful in some other places, i.e. the number_of_partitions()
code since that code currently fails doctests on Sparc/Solaris (it might
be completely unrelated to sqrtl(), but as it the code does not compile on
FreeBSD 8 due to the use of sqrtl() there)
* There should be some extensive testing done for that function. I am
sure someone using the function and getting back some error message will
not be happy that an error was detected, but complain and not see the
advantage of detecting the issue in the first place :)
* If some doctest here fails on Sparc/Solaris for example I will not
merge this patch since I don't need any more bugs introduced that in the
end someone else (i.e. William or me has to fix). Some of the fixes took a
long, long time to hunt down (and we are still not done '''now'''), so the
attitude that someone else will clean up such a mess is not something I am
willing to accept, not that any person involved in this ticket has this
attitude ;).
Cheers,
Michael
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5130#comment:20>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---