I'm not sure if I'm doing something wrong or if this is a bug. I did a search of this thread and did not see anything under "float2rational. I'm using Google Translate because English (USA) is my native language. I am trying to use the command float2rational and I can't seem to get it to display a rational result. I have tried with "xcas 0.9.5 (c) 2000-8, Bernard Parisse, Renee De Graeve" on linux and on Windows XP. I'm trying to use float2rational as I would use "XQ" on the HP50g.
Thank you, Ronald Williams
Problem getting a rational result from "float2rational()"
Modérateur : xcasadmin
-
- Messages : 6
- Inscription : lun. mars 07, 2011 2:03 pm
Re: Problem getting a rational result from "float2rational()"
I just tried the example of the online short help float2rational(1.5) returns the rational 3/2. Can you give an example of input where you get an unexpected answer?
-
- Messages : 6
- Inscription : lun. mars 07, 2011 2:03 pm
Re: Problem getting a rational result from "float2rational()"
I have just tried the same example without success. I attached a window capture so you can better see what I am doing wrong.
Thank you, Ronald Williams
Thank you, Ronald Williams
- Pièces jointes
-
- XCAS float2rational example.jpg (97.37 Kio) Consulté 5314 fois
Re: Problem getting a rational result from "float2rational()"
Ok, it's the precision, go back to Digits:=12 and you will get the answer, float2rational does not convert multi-precision floats currently, only hardware floats, I guess we need to fix that.
-
- Messages : 6
- Inscription : lun. mars 07, 2011 2:03 pm
Re: Problem getting a rational result from "float2rational()"
Thank you for the work around. I'm glad I sent the screen print. It seemed to pinpoint the problem.
I really like Xcas. I find it a natural extension of the HP 49/50 cas functionally. Many thanks go to you and your team for developing and sharing these wonderful tools.
Ronald Williams
I really like Xcas. I find it a natural extension of the HP 49/50 cas functionally. Many thanks go to you and your team for developing and sharing these wonderful tools.
Ronald Williams