Re: [sage-devel] Re: Proposal: Remove GNUTLS from Sage.

2012-01-19 Thread Volker Braun
On Thursday, January 19, 2012 4:07:21 PM UTC-8, Dr. David Kirkby wrote:
>
> I don't see any reference to "system library" 
>
Fine, replace it with library "of the operating system on which the 
executable runs".

and I certainly would have thought 
> "totally insignificant" and "major" to have different meanings.
>

They do. My point being that "major" in the GPL text refers to other 
"components" and not to the library "of the operating system on which the 
executable runs". The library of the operating system on which the 
executable runs only needs to be shipped with the major components, not be 
one of the major components. 

Clearly OpenSSL is not shipped as part of the OS for many.
>
Even Debian comes with openssl, so arguably thats not true. And the GPL 
doesn't require any minimum popularity of the operating system on which the 
executable runs. But thats all besides the point. If the distribution 
doesn't have openssl, then prebuilt Sage binaries will necessarily not link 
to openssl.

>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Proposal: Remove GNUTLS from Sage.

2012-01-19 Thread Dr. David Kirkby

On 01/17/12 04:50 AM, Volker Braun wrote:

On Monday, January 16, 2012 8:35:56 PM UTC-5, Dr. David Kirkby wrote:


Personally I don't see how OpenSSL can be considered a major part of the
operating system.



You misread the license. For GPL purposes, a "system library" can be
totally insignificant as long as it is shipped with the major system
components.




I don't see any reference to "system library" and I certainly would have thought 
"totally insignificant" and "major" to have different meanings.


Clearly OpenSSL is not shipped as part of the OS for many.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] the ARM port - numerical noise

2012-01-19 Thread Julien Puydt

Le 19/01/2012 20:11, Jeroen Demeyer a écrit :

On 2012-01-19 14:46, Julien Puydt wrote:

Does there exist a mechanism which allows an spkg to leave some file,
where some variables are defined, which will get used for the
compilation of packages afterwards?

What do you have in mind?


We need some way, if cephes has been used, to automagically use it to 
compile other packages, if I understood well.


So I'm asking whether some kind of such mechanism exist, which could be 
used ot extended to handle that situation.


Snark on #sagemath

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] the ARM port - numerical noise

2012-01-19 Thread Jeroen Demeyer
On 2012-01-19 14:46, Julien Puydt wrote:
> Does there exist a mechanism which allows an spkg to leave some file,
> where some variables are defined, which will get used for the
> compilation of packages afterwards?
What do you have in mind?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] the ARM port - numerical noise

2012-01-19 Thread Robert Bradshaw
On Wed, Jan 18, 2012 at 1:26 AM, Dima Pasechnik  wrote:
>
>
> On Monday, 16 January 2012 22:48:01 UTC+8, Snark wrote:
>>
>> Le 16/01/2012 15:42, Burcin Erocal a �crit :
>>
>> > On Mon, 16 Jan 2012 04:21:37 -0800 (PST)
>> > Dima Pasechnik  wrote:
>>
>> >
>> >> Once again, let me bring up the numerical noise issue on ARM.
>> >> The problem is that while we pretty much narrowed it down to a
>> >> particular function computing the log of the gamma-function,
>> >> lgammal, in elibc, an implementation of libc used on Ubuntu 11.10 (on
>> >> ARM, at least), the chances that the upstream fixes it seem to be
>> >> rarher slim. Fixing it myself does not look trivial � this C code is
>>
>> >> not at all pretty, uses a lot of hardwired largish
>> >> constants, etc etc (and we cannot just patch a system library easily
>> >> anyway, so it needs to get into the upstream, etc etc...)
>> >>
>> >> I can produce doctest patches that will to the appropriate rounding,
>> >> but this potentially would make the corresponding doctests less
>> >> reliable (we talking about things like 120.0 vs 199.9997 for
>> >> gamma(float(6)), something like this).
>> >>
>> >> As far as I know, doctests cannot be OS-dependent.
>> >> Any way out of this Catch-22?
>> >
>> > I guess this is the same problem as #9162.
>> >
>> > We should call a more reliable lgamma() function on these platforms.
>> > IIRC, the cephes package was included in Sage for this purpose. We
>> > could call the lgam() from cephes in sage/symbolic/pynac_cc.h to fix
>> > this.
>>
>> Is the answer really bad or is it just that it doesn't print the same on
>> all platforms?
>
> there is a loss of precision on ARM and Cygwin, compared to the rest of
> platforms.
> (and the precision is worse than advertised by the lgammal implementation,
> IMHO)
> So weakening the test does not seem to the the right thing to do.

+1. Especially for something as basic as gamma(6).

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread William Stein
On Thu, Jan 19, 2012 at 10:41 AM, Jason Grout
 wrote:
> On 1/19/12 12:34 PM, William Stein wrote:
>>
>> (which exposes that font bug in mathjax).
>
>
> Just to be clear, since your comment could be read two ways, my
> understanding is the bug is in Lion, not in mathjax.

Thanks.  I keep forgetting that Lion is full of bugs.   Jobs' reality
distortion field is haunting me.


 -- William

>
> Thanks,
>
> Jason
>
>
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread Jason Grout

On 1/19/12 12:34 PM, William Stein wrote:

(which exposes that font bug in mathjax).


Just to be clear, since your comment could be read two ways, my 
understanding is the bug is in Lion, not in mathjax.


Thanks,

Jason


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread William Stein
On Thu, Jan 19, 2012 at 10:09 AM, John H Palmieri
 wrote:
>
>
> On Thursday, January 19, 2012 9:37:00 AM UTC-8, William wrote:
>>
>> Hi,
>>
>> Regarding jsmath and mathjax...   It seems like we have the issues
>> worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
>> etc., for their persistence.
>>
>> I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
>> their math typesetting is very, very painful to look at.  It turns out
>> they recently switched from jsmath to mathjax.
>
>
> I'm not sure about that.  I see one page
> (http://meta.mathoverflow.net/discussion/637/report-bugs-with-latex-mathjax-rendering-here/#Item_0)
> which says that they switched in August 2010.  Have you changed operating
> systems or browsers recently?

Actually, I used to read mathoverflow a lot in 2010, and have only
read it less since then and I did switch to OS X Lion fairly
recently (which exposes that font bug in mathjax).

>   That could explain the difference in
> appearance.  For example, mathoverflow doesn't look good with Chrome OS X
> Lion, but to me it looks fine in Firefox or OS X 10.6.

Very good point.

>
> --
> John
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread William Stein
On Thu, Jan 19, 2012 at 10:14 AM, Jason Grout
 wrote:
> On 1/19/12 11:37 AM, William Stein wrote:
>>
>> Hi,
>>
>> Regarding jsmath and mathjax...   It seems like we have the issues
>> worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
>> etc., for their persistence.
>
>
> At what point should we merge it?

It's up to you, I think, since you're really taking charge with the
next notebook release. I'm fine with waiting, since there do seem to
be some stability issues with it soon.  The main feature is that one
should get nice typesetting without having to install the jsmath
fonts, and that is really valuable.

>> I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
>> their math typesetting is very, very painful to look at.  It turns out
>> they recently switched from jsmath to mathjax.  Even trying all
>> settings, I couldn't get their mathjax to look usable (I think they
>> have the same Stix fonts on OS X 10.7 bug we saw earlier).  They do
>> have a button in the right to "(Re)process math with jsMath.", which
>> works fine.
>
>
> There are discussions about including the workaround Davide posted in the
> next maintenance release of Mathjax, so hopefully soon it will be worked
> around.
>
>
>
>> If we do have further reported issues, we might want to
>> consider supporting both temporarily...
>
>
> I think supporting both would not be doable for me timewise (if you want
> passing doctests, etc.).  If someone else wanted to make those changes to
> support both, though, go right ahead.

Good point.  We should just switch rather than supporting both.

>
>
> Thanks,
>
> Jason
>
>
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread Jason Grout

On 1/19/12 11:37 AM, William Stein wrote:

Hi,

Regarding jsmath and mathjax...   It seems like we have the issues
worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
etc., for their persistence.


At what point should we merge it?

I hesitate to merge it into #11080, since we've already been delaying 
that ticket for a long time as we added more things.  It would be great 
if reviewing could finish for #11080 and its dependencies.  Then we 
could incorporate mathjax into sagenb 0.9.1, which could probably also 
be reviewed in time for sage 5.0.





I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
their math typesetting is very, very painful to look at.  It turns out
they recently switched from jsmath to mathjax.  Even trying all
settings, I couldn't get their mathjax to look usable (I think they
have the same Stix fonts on OS X 10.7 bug we saw earlier).  They do
have a button in the right to "(Re)process math with jsMath.", which
works fine.


There are discussions about including the workaround Davide posted in 
the next maintenance release of Mathjax, so hopefully soon it will be 
worked around.




If we do have further reported issues, we might want to
consider supporting both temporarily...


I think supporting both would not be doable for me timewise (if you want 
passing doctests, etc.).  If someone else wanted to make those changes 
to support both, though, go right ahead.


Thanks,

Jason



--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread John H Palmieri


On Thursday, January 19, 2012 9:37:00 AM UTC-8, William wrote:
>
> Hi,
>
> Regarding jsmath and mathjax...   It seems like we have the issues
> worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
> etc., for their persistence.
>
> I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
> their math typesetting is very, very painful to look at.  It turns out
> they recently switched from jsmath to mathjax.  
>

I'm not sure about that.  I see one page 
(http://meta.mathoverflow.net/discussion/637/report-bugs-with-latex-mathjax-rendering-here/#Item_0)
 
which says that they switched in August 2010.  Have you changed operating 
systems or browsers recently?  That could explain the difference in 
appearance.  For example, mathoverflow doesn't look good with Chrome OS X 
Lion, but to me it looks fine in Firefox or OS X 10.6. 

-- 
John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Macupdate site is for Sage is ... interesting

2012-01-19 Thread kcrisman


On Jan 19, 12:12 pm, William Stein  wrote:
> On Thu, Jan 19, 2012 at 7:57 AM, kcrisman  wrote:
> > Here's a confused customer:
> > Please use a reasonable name for the app, just Sage.app. Version and
> > platform information does not belong in the app's name. This belongs
> > in the info plist and web site, and perhaps the disk image name.
>
> I don't think they are actually "confused".  They are just complaining
> about this design decision
> by the person that made the Sage OS X app.
>
> Coincidentally, I just happen to be testing app bundles for [1] and
> this involves installing multiple versions
> of the Sage app bundle at the same time.  I'm glad they have different
> names.   Given that Sage  supports running multiple versions of Sage
> on the same computer, having different names is a useful feature.  It
> is also easy to rename the app by clicking on it and pressing
> "return".   So before somebody makes a big change based on this one
> comment, please think.

I don't see how we could in any case, given that we don't want to make
an app with five or six different configurations inside it (if you
think Sage is a big download now...).  I was definitely not suggesting
we change our naming scheme, just trying to be charitable to the
poster :)

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: [sage-notebook] Mathjax needs review

2012-01-19 Thread William Stein
Hi,

Regarding jsmath and mathjax...   It seems like we have the issues
worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
etc., for their persistence.

I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
their math typesetting is very, very painful to look at.  It turns out
they recently switched from jsmath to mathjax.  Even trying all
settings, I couldn't get their mathjax to look usable (I think they
have the same Stix fonts on OS X 10.7 bug we saw earlier).  They do
have a button in the right to "(Re)process math with jsMath.", which
works fine.If we do have further reported issues, we might want to
consider supporting both temporarily...


[1] http://mathoverflow.net/questions/82809/torsion-points-of-cm-elliptic-curves

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Two articles of interest to Sage in latest Notices

2012-01-19 Thread daly
On Wed, 2012-01-18 at 23:45 +0100, Burcin Erocal wrote:
> On Wed, 18 Jan 2012 12:26:33 -0800 (PST)
> kcrisman  wrote:
>  
> > Publishing Computational Mathematics, by Tim Daly (of Axiom, a
> > frequent contributor on sage-devel)
> > http://www.ams.org/notices/201202/rtx120200320p.pdf
> 
> Literate programming is not just adding comments to code, but here are
> a few numbers nevertheless...
> 
> FriCAS (I couldn't find Axiom on ohloh.net):
>   https://www.ohloh.net/p/fricas
># of lines of code: 1218007
># of comment lines:  205615

http://en.wikipedia.org/wiki/Axiom_computer_algebra_system
http://axiom-developer.org

Axiom has a project focus to become a literate program.
FriCAS has a project focus to compete with Mathematica.
Due to this philosophical difference the Axiom project
forked. 

New computational mathematics is always interesting but
it is more important to make sure that the code can be
modified and maintained without devoting your life to
the task. Projects die when the original authors leave.
Sourceforge has 100,000 piles of "dead code". In order
to keep Axiom "alive" it must be possible to understand,
modify, and maintain it. I firmly believe that literate
programming is the only technology that can achieve this.

Axiom is being rewritten to be fully literate. The code
is being moved from a "tree of little files" to volumes
with a particular focus. There are currently 21 volumes.

These volumes contain actual executable source code which
is extracted at build time. So the code you see in the
books is the actual source code.

There are still many small files to rewrite and distribute
into their proper locations and there is still a great
deal of explanation to be added to the volumes. However,
this project has "a 30 year horizon" so this huge task
is "right on schedule".

> 
> Singular:
>   https://www.ohloh.net/p/Singular
># of lines of code:  456764
># of comment lines:   73429
> 
> Sage:
>   https://www.ohloh.net/p/sage
># of lines of code:  474866
># of comment lines:  551813

Literate programming has nothing to do with comments.
They are completely orthogonal. Think of literate programs
as works of literature. You are telling a story (of why
the code exists and what you are trying to solve). You 
need to motivate the characters (so procedures need to be
introduced at the proper time in the explanation, not when
the compiler needs it). You are trying to write a story for
another human being, not code comments for the programmer.
Write down the theory behind the code.

The "Hawaii test" is a good benchmark. Can you bring a new
person on the project, give them the literate books, send 
them away to an all-expense paid, 2 week vacation to Hawaii,
and when they return they can maintain and modify the 
program as well as the original authors?

I have found 2 literate programs that I consider examples:
"Lisp in Small Pieces" by Queinnec (ISBN 0-521-56247-3)
"Implementing Elliptic Curve Cryptography" by Rosing
(ISBN 1-884777-69-4)

I claim that literate programming improves code in 3 ways:
A) the original programmer discovers errors while writing
   up the full explanation for peer review
B) peer reviewers gain a deep understanding of the problem
   and can critique the original motivation for the code
   including how well the implementation covers it.
C) future programmers can correctly modify and maintain
   the code in the spirit it was written.

All of these are just opinions at this point but they can
be tested. I am trying to find a university willing to
run a test of hypothesis B. Students would be given either
a literate program (e.g. Rosing's book) or the original
source code (e.g. Rosing's downloadable source) and asked
questions to test their comprehension, such as given
   #DEFINE NUMBITS 158
what is the significance of "158"? Do you know?

Elliptic curve code uses modular polynomial arithmetic 
which Rosing explains but would be really hard to 
"reverse engineer" from the source code.

> 
> Gap wasn't available for comment at the time of publication:
>   https://www.ohloh.net/p/gap-system
> 
> 
> This is also a good occasion to paste "sage -coverageall" output from
> 5.0.prealpha0:
> 
> Overall weighted coverage score:  86.3%
> Total number of functions:  28917
> We need 1056 more function to get to 90% coverage.
> We need 2502 more function to get to 95% coverage.
> We need 3658 more function to get to 99% coverage.

Test coverage is an excellent idea. Commenting code is an
excellent idea. Choosing descriptive variable names is an
excellent idea. Code standards are an excellent idea. All
of these have nothing to do with a literate program.

Literate programming can be done in any language. 
I wrote an example using HTML:
http://axiom-developer.org/axiom-website/litprog.html

Are you creating computational mathematics useful for
future generations or will they start yet-another-
from-scratch-computer-algebra-system to replace Sage?

Raise you

[sage-devel] Re: [sage-marketing] Macupdate site is for Sage is ... interesting

2012-01-19 Thread William Stein
On Thu, Jan 19, 2012 at 7:57 AM, kcrisman  wrote:
> http://www.macupdate.com/app/mac/27562/sage
>
> Apparently some people actually download Sage from Macupdate.com.
> Unfortunately, the information is not very accurate. (Some of the
> reviews are negative, too, but that's a different matter, as people
> will have preferences.)
>
> For instance, the download link is for the PPC version, but then it
> says
>
> REQUIREMENTS
> Mac OS X 10.6 or later
> 64-bit processor
>
> Here's a confused customer:
> Please use a reasonable name for the app, just Sage.app. Version and
> platform information does not belong in the app's name. This belongs
> in the info plist and web site, and perhaps the disk image name.
>
> Interested parties who have accounts there or know how to change it
> can go there for more detail.

I definitely don't have a developer account there.  I don't know who
setup the Sage page there.  I wish it didn't exist.

I do get emails every once in a while about the Sage macupdate page
getting updated.

 -- William


-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Macupdate site is for Sage is ... interesting

2012-01-19 Thread kcrisman
http://www.macupdate.com/app/mac/27562/sage

Apparently some people actually download Sage from Macupdate.com.
Unfortunately, the information is not very accurate. (Some of the
reviews are negative, too, but that's a different matter, as people
will have preferences.)

For instance, the download link is for the PPC version, but then it
says

REQUIREMENTS
Mac OS X 10.6 or later
64-bit processor

Here's a confused customer:
Please use a reasonable name for the app, just Sage.app. Version and
platform information does not belong in the app's name. This belongs
in the info plist and web site, and perhaps the disk image name.

Interested parties who have accounts there or know how to change it
can go there for more detail.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] the ARM port - numerical noise

2012-01-19 Thread Julien Puydt

Le 19/01/2012 09:15, Dima Pasechnik a écrit :

Installing cephes means building static libs and putting appropriate
headers somewhere in $SAGE_ROOT/local (cephes is currently only
installed on Cygwin, where it provides some missing functionality for
complex number support), using parts of its code.
The whole thing is most probably not needed.



A clean solution would be to let the linker get the corresponding
libBLAH.a, with the corr. compiled cephes functions, ahead of libm, but
how does this fit in the general scheme of things?
I imagine that then "Sage linker" should be aware of this, somehow...


Does there exist a mechanism which allows an spkg to leave some file, 
where some variables are defined, which will get used for the 
compilation of packages afterwards?


Snark

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] the ARM port - numerical noise

2012-01-19 Thread Dima Pasechnik


On Monday, 16 January 2012 22:42:20 UTC+8, Burcin Erocal wrote:
>
> On Mon, 16 Jan 2012 04:21:37 -0800 (PST)
> Dima Pasechnik  wrote:
>
> > Once again, let me bring up the numerical noise issue on ARM.
> > The problem is that while we pretty much narrowed it down to a
> > particular function computing the log of the gamma-function, 
> > lgammal, in elibc, an implementation of libc used on Ubuntu 11.10 (on
> > ARM, at least), the chances that the upstream fixes it seem to be
> > rarher slim. Fixing it myself does not look trivial – this C code is
> > not at all pretty, uses a lot of hardwired largish
> > constants, etc etc (and we cannot just patch a system library easily 
> > anyway, so it needs to get into the upstream, etc etc...)
> > 
> > I can produce doctest patches that will to the appropriate rounding,
> > but this potentially would make the corresponding doctests less
> > reliable (we talking about things like 120.0 vs 199.9997 for
> > gamma(float(6)), something like this).
> > 
> > As far as I know, doctests cannot be OS-dependent.
> > Any way out of this Catch-22? 
>
> I guess this is the same problem as #9162.
>
> We should call a more reliable lgamma() function on these platforms.
> IIRC, the cephes package was included in Sage for this purpose. We
> could call the lgam() from cephes in sage/symbolic/pynac_cc.h to fix
> this.
>
ok, I checked that cephes' gammal works OK on ARM, but the question is how 
to properly
incorporate this, to prevent name clashes.

 Installing cephes means building static libs and putting appropriate
headers somewhere in $SAGE_ROOT/local (cephes is currently only installed 
on Cygwin, where it provides some missing functionality for complex number 
support), using parts of its code.
The whole thing is most probably not needed.

A clean solution would be to let the linker get the corresponding 
libBLAH.a, with the corr. compiled cephes functions, ahead of libm, but how 
does this fit in the general scheme of things?
I imagine that then "Sage linker" should be aware of this, somehow... 

Dima



 

> Cheers,
> Burcin
>
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org