Post Reply 
Existing CAS commands --> Prime discussion
11-29-2018, 12:30 PM (This post was last modified: 11-29-2018 12:31 PM by compsystems.)
Post: #39
RE: Existing CAS commands --> Prime discussion
(11-29-2018 01:47 AM)rprosperi Wrote:  But if you use epsilon:=5E-12, as suggested by Joe to get the same results as Home's fraction button, exact() provides the same result as float2rational(). The magnitude of epsilon controls how far the reduction is continued.

It is true, but I think that this command was not included (hpp cas) because apparently it is mentioned as "synonymous" and with an example that is not fulfilled implies that they are not identical commands, therefore, this important command must be included.

by ejp I wish to show step by step the conversion of a periodic fractional number to a rational number
PHP Code:
'f=0.324532453245' // eq1
// eq1 * 10000
10000*(f=0.324532453245)
10000*3245.32453245 // eq2
// eq2 - eq1
(10000*3245.32453245) - (f=0.324532453245)
(
9999*f) = 3245
f
=3245/9999
solve
((9999*f) = 3245,f,'='↵ set[295/909

now with exact & float2rational

epsilon:=1E-12:;
exact(0.324532453245) ↵1100186656/3390066679
float2rational(0.324532453245) ↵ 295/909
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Existing CAS commands --> Prime discussion - compsystems - 11-29-2018 12:30 PM



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