Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions on changing Mathematica expressions of one type or format to another, for example date formats, Boxes and other typesetting representations, or different units of measurements.
4
votes
How to get exact Rationalize of a decimal number?
I've found, empirically, that I can ensure Rationalize[ ] provides an exact rational conversion of whatever decimal I enter (call it "num") if I evaluate
Rationalize[num`z, 0] where:
$z \geq 2*\text{ … Alternately, you can also achieve an exact rational conversion using Round[num`y, 10^-y], where (again, empricially), I've found that:
$y \geq \text{Length@RealDigits[num][[1]]} + 1$
Thus:
Round[0.97646105481464028 …