Re: [sage-support] Fwd: Sage Code

2015-10-01 Thread William Stein
On Thu, Oct 1, 2015 at 12:39 PM, Thomas Judson wrote: > Does anyone have any idea what is going on with the following code? > > var('t') > g = 9.8 > m = 80 > c = 1/(2*sqrt(3)) > f(x) = tanh(x) > v(t) = sqrt(g*m/c)*f(sqrt(g*c/m)*t) > T = 18.13 > sum(v(t)*T/800 for t in srange(0,T,T/800)).n(digits=8

Re: [sage-support] Fwd: Sage Code

2015-10-01 Thread Christophe Bal
Hello. Have you try With décimal fractions instead of float values ? Le 1 oct. 2015 21:39, "Thomas Judson" a écrit : > Does anyone have any idea what is going on with the following code? > > var('t') > g = 9.8 > m = 80 > c = 1/(2*sqrt(3)) > f(x) = tanh(x) > v(t) = sqrt(g*m/c)*f(sqrt(g*c/m)*t) >

[sage-support] Fwd: Sage Code

2015-10-01 Thread Thomas Judson
Does anyone have any idea what is going on with the following code? var('t') g = 9.8 m = 80 c = 1/(2*sqrt(3)) f(x) = tanh(x) v(t) = sqrt(g*m/c)*f(sqrt(g*c/m)*t) T = 18.13 sum(v(t)*T/800 for t in srange(0,T,T/800)).n(digits=8) sum(v(t)*T/800 for t in srange(0,T,T/800)).n(digits=7) sum(v(t)*T/800 fo