I am looking for a function that would transform a fraction of the form:
$$\frac{1.0\times 10^{-10}}{1.0\times 10^{-11}+1.0\times 10^{-12}\,x}$$
into this: $$\frac{1.0}{1.0\times 10^{-1}+1.0\times 10^{-2}\,x}$$
or this: $$\frac{100.0}{10.0+1.0\,x}\;.$$
I've tried Simplify
and FullSimplify
but they don't work this way.
Any help will be appreciated.
[edit]
Oh, when I tried Simplify
, it was a harder case of something like
$$\frac{1.0\times 10^{-10}+1.0\times 10^{-12}\,x}{1.0\times 10^{-11}+1.0\times 10^{-12}\,x}$$
Actually, Simplify
works for the previous fraction but does not simplify this one.
However, answer by Carl Woll (in the comments) works perfectly for both. Thank you!
N @ Simplify @ Rationalize[expr, 0]
? $\endgroup$Cancel
yields the desired result (last one). $\endgroup$Simplify
produces the last result requested,100./(10. + 1.*x)
$\endgroup$((1.0*10^-10 + 1.0*10^-12*x)/(1.0*10^-11 + 1.0*10^-12*x) // Cancel) /. {1. -> 1}
works also. $\endgroup$