On Aug 29, 2009, at 11:05 PM, Rolandb wrote:
Hi,
Using math.log has a disadvantage; it is less accurate.
sage: print n(math.log(2),100)
sage: print n(log(2),100)
0.69314718055994528622676398300
0.69314718055994530941723212146
Yes, it is. Accuracy vs. speed is a common tradeoff one needs
On 1 sep, 11:08, Robert Bradshaw rober...@math.washington.edu wrote:
On Aug 29, 2009, at 11:05 PM, Rolandb wrote:
Hi,
Using math.log has a disadvantage; it is less accurate.
sage: print n(math.log(2),100)
sage: print n(log(2),100)
0.69314718055994528622676398300
On Sep 1, 2009, at 9:23 AM, Rolandb wrote:
On 1 sep, 11:08, Robert Bradshaw rober...@math.washington.edu wrote:
On Aug 29, 2009, at 11:05 PM, Rolandb wrote:
Hi,
Using math.log has a disadvantage; it is less accurate.
sage: print n(math.log(2),100)
sage: print n(log(2),100)
Hi,
Using math.log has a disadvantage; it is less accurate.
sage: print n(math.log(2),100)
sage: print n(log(2),100)
0.69314718055994528622676398300
0.69314718055994530941723212146
Rolandb
On 30 aug, 06:48, Robert Bradshaw rober...@math.washington.edu
wrote:
On Aug 29, 2009, at 12:44 PM,
Hi Roland,
indeed strange.
I think a reasonable approach is to print some status information,
e.g.:
sage: def expon(mx,g):
: print 'expon'
: return floor(log(mx)/log(g))+1
:
sage: def heelsnel(reeks,maxum):
: print reeks
: if len(reeks)==1: return
On Aug 29, 8:51 am, Simon King simon.k...@nuigalway.ie wrote:
Note that expon uses Maxima, because you use the logarithm. So, I
reckon that your problem is related
withhttp://trac.sagemath.org/sage_trac/ticket/4731
andhttp://trac.sagemath.org/sage_trac/ticket/6818.
If not, you might try
On Sat, Aug 29, 2009 at 8:16 AM, Rolandb rola...@planet.nl wrote:
Hi,
I came across an amazing difference in execution time. Consider:
sage: def heelsnel(reeks,maxum):
...
... def expon(mx,g): return floor(log(mx)/log(g))+1
...
... if len(reeks)==1: return
Hi William,
On Aug 29, 5:52 pm, William Stein wst...@gmail.com wrote:
[...]
Can you post a version where I can actually paste in the code? You
probably have this in a file somewhere without the sage: and ... prompts.
Is it possible to change the preparser, so that it not only swallows
the
On Sat, Aug 29, 2009 at 10:15 AM, Simon King simon.k...@nuigalway.iewrote:
Hi William,
On Aug 29, 5:52 pm, William Stein wst...@gmail.com wrote:
[...]
Can you post a version where I can actually paste in the code? You
probably have this in a file somewhere without the sage: and ...
On 29 aug, 18:43, John H Palmieri jhpalmier...@gmail.com wrote:
On Aug 29, 8:51 am, Simon King simon.k...@nuigalway.ie wrote:
Note that expon uses Maxima, because you use the logarithm. So, I
reckon that your problem is related
withhttp://trac.sagemath.org/sage_trac/ticket/4731
On Aug 29, 2009, at 12:44 PM, Rolandb wrote:
On 29 aug, 18:43, John H Palmieri jhpalmier...@gmail.com wrote:
On Aug 29, 8:51 am, Simon King simon.k...@nuigalway.ie wrote:
Note that expon uses Maxima, because you use the logarithm. So, I
reckon that your problem is related
11 matches
Mail list logo