Post Reply 
Is it bug? CAS solve function.
04-19-2018, 06:25 PM
Post: #8
RE: Is it bug? CAS solve function.
(04-19-2018 04:22 PM)compsystems Wrote:  in the following example if you see two different results.

HP-prime
solve(x^3-1.1*x^2-65.4*x+229.5=0,x) {-9.,5.00000000001,5.09999999999}

Xcas
solve(x^3-1.1*x^2-65.4*x+229.5=0,x) list[-9.0,5.0,5.1]

Prime's CAS uses a 48-bit binary mantissa for floating-point numbers. Hence:
format(1.1,"d17") --> "1.099999999999994"
format(65.4,"d17") --> "-65.39999999999963"
format(229.5,"d17") --> "229.4999999999999"

So it's no great surprise that inexact inputs result in inexact outputs.

What does Xcas use for its internal representation of floating-point numbers?

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Is it bug? CAS solve function. - Lukia - 04-18-2018, 04:16 AM
RE: Is it bug? CAS solve function. - Vtile - 04-21-2018, 08:44 PM
RE: Is it bug? CAS solve function. - Han - 04-19-2018, 04:00 PM
RE: Is it bug? CAS solve function. - Joe Horn - 04-19-2018 06:25 PM
RE: Is it bug? CAS solve function. - Lukia - 04-21-2018, 02:47 AM
RE: Is it bug? CAS solve function. - DrD - 04-21-2018, 02:58 PM



User(s) browsing this thread: 1 Guest(s)