ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 08 Dec 2017 17:45:51 -0600Why is a==b False?http://ask.sagemath.org/question/40024/why-is-ab-false/Please see the following code. Why is a==b False? Thanks!
Input:
a=n(1/2*sqrt(5) - 1/2,digits=15)
b=n(1-a^2,digits=15)
print a
print b
a==b
Output:
0.618033988749895
0.618033988749895
FalseKapcakFri, 08 Dec 2017 17:45:51 -0600http://ask.sagemath.org/question/40024/Solve contains wrong solutionhttp://ask.sagemath.org/question/9597/solve-contains-wrong-solution/Hello, I tried to following to find a maxima of a function:
var('t x');
f=(e^(x*t))*(x-1)^2;
maxima = solve([derivative(f,x)==0, derivative(f,x,2)<0],x)
show(maxima);
And the solution sage spits out are:
[
[x == 1, -2 > 0],
[x == (t - 2)/t, -(t - 2)^2 + 2*(t - 2)*t - t^2 + 6 > 0]
]
I understand that sage cannot evaluate the validity of the second solution but the first one surely is no solution at all.
Why does it give me this solution or am I doing anything wrong?mawekiSat, 01 Dec 2012 15:14:02 -0600http://ask.sagemath.org/question/9597/