Post Reply 
Getting 'N/D' to eval as a fraction not a decimal
03-06-2015, 03:50 AM
Post: #2
RE: Getting 'N/D' to eval as a fraction not a decimal
(03-05-2015 07:57 AM)BruceH Wrote:  In a program, I want to generate a fraction e.g.
N:=1 ; D:=2; RETURN 'N/D';

The following works in Home programs IF both N and D are integers AND you make sure that the "Change apparent integers into exact integers" setting in CAS Settings (page 1, check box at end of line 3) is checked:

print(simplify(N/D))

An elegant solution that always works (and doesn't rely on non-programmable CAS settings) would be greatly appreciated.

<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
RE: Getting 'N/D' to eval as a fraction not a decimal - Joe Horn - 03-06-2015 03:50 AM



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