simplification

Messages in english

Modérateur : xcasadmin

XcasEngGuy
Messages : 146
Inscription : mer. janv. 13, 2010 3:20 pm

simplification

Message par XcasEngGuy » dim. mai 03, 2015 8:45 pm

Hello,
I am using xcas 1.1.4-16 (c) 2000-14.

I found that the following equation would not simplify:

eq1:=1.2*H*phi=(2*H*nH2O)
eq2:=nH2O=solve(eq1,nH2O)[0]
eq3:=simplify(eq2)
eq4:=simplify(eq3)
eq5:=expand(eq4)

I get nH2O=(0.6*H*phi/H) as a result. The H/H will not cancel. Any suggestions?

Thank you

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: simplification

Message par parisse » lun. mai 04, 2015 11:42 am

That's related to the inexact floating point number. If you replace 1.2 by 6/5 or use simplify(exact()), then it is simplified.

XcasEngGuy
Messages : 146
Inscription : mer. janv. 13, 2010 3:20 pm

Re: simplification

Message par XcasEngGuy » lun. mai 04, 2015 6:41 pm

Interesting. That works. I am confused by the reason why. H/H is not recognized in this case?

Thank you for the answer. I will definitely be using it.

Répondre