Status: Started
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3533 by [email protected]: solve with floats results in loss of precision
http://code.google.com/p/sympy/issues/detail?id=3533

solve(x/(1-x)**2-10**-10)
[0, 10000000002.0000]
_[0]==0
True
a, b = solve(x/(1-x)**2-10**-S(10))
b.n()
9.99999999800000e-11

The zero returned from solve is the result of applying nfloat which defaults to n=15:


for i in range(15,30):
...   print i, nfloat(b, i)
...
15 0
16 0
17 0
18 0
19 1.164153218269348145e-10
20 1.0186340659856796265e-10
21 1.00044417195022106171e-10
22 9.993073035730049014091e-11
23 1.0000178463087650015950e-10
24 1.00000008274037099909037e-10
25 1.000000082740370999090374e-10
26 1.0000000133514319600180897e-10
27 9.99999996004197200250018795e-11
28 9.999999992568037177065320975e-11
29 9.9999999979890480394928431451e-11
b.n()
9.99999999800000e-11



--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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/sympy-issues?hl=en.

Reply via email to