When you use
SetPrecision to set the precision of say
1.1 you will get some seemingly random numbers padded before the rest will be padded by zeros. I assume this comes from the true machine precision representation of
1.1 having these hidden numbers.
When you use backticks you do get the more intuitive result of the expression only being padded with zeros. This seems more desirable to me since what I want is to input floats as close to exact as possible (i.e. I mean that I want
1.1 to be as close as possible to
But how do I use the backtick as a function. The
Fullform is just the backtick and gives no hints for how to use it in a function. Naive tries such as
#`40& are not considered valid syntax.
I guess a function could be constructed by multiplying by some power of ten and then rounding to an exact number. Followed by dividing by the same power of ten and using N[#, prec]& on the result but this seems needlessly complicated.
(Alternatively, explain to me why trying to get the backtick result is a bad idea.)