I'm attempting to add $MachineEpsilon
to numbers I am pulling from the domains of 3 interpolating functions. I pulled 3 numbers, and for one of these numbers adding $MachineEpsilon
produces a number slightly larger than the first (as expected). For some reason for the second two numbers, adding $MachineEpsilon
does nothing - the number stays the same. I noticed that there are more significant digits in the first number than the last two, which I suppose could have something to do with this, but how can I fix this so that adding $MachineEpsilon
will create a higher number for the last two numbers? Below is the output that I got by adding $MachineEpsilon
to my numbers (lim,lim1,lim2):
eps=$MachineEpsilon
InputForm[lim]
(* 1.7775896893621104 *)
InputForm[lim + eps]
(* 1.7775896893621106 *)
InputForm[lim1]
(* 4.925661999190314 *)
InputForm[lim1 + eps]
(* 4.925661999190314 *)
InputForm[lim2]
(* 8.10371456559119 *)
InputForm[lim2 + eps]
(* 8.10371456559119 *)
Additionally, this is how I'm pulling the numbers from the interpolating functions (leaving out some unneccessary code for simplicity):
dom = InterpolatingFunctionDomain[First[r /. g1]];
dom1 = InterpolatingFunctionDomain[First[r /. g2]];
dom2 = InterpolatingFunctionDomain[First[r /. g3]];
dom3 = InterpolatingFunctionDomain[First[r /. g4]];
{lim, b} = dom1[[1]];
{lim1, b1} = dom2[[1]];
{lim2, b2} = dom3[[1]];
Thanks for any help! I'm using the pulled numbers and their next closest in plot and have continued to get the pllp error message saying the two numbers are the same.
$MachineEpsilon
; it is an issue with understanding of what epsilon actually represents. It is a scaled unit in the last place such thatn
andn + n $MachineEpsilon
differ. If you add$MachineEpsilon
unscaled to values greater than 1, then it is not surprising that they are unchanged by that. $\endgroup$$MachineEpsilon
means. See this note, in particular "Variant definitions". Indeed, it would be an issue if you were getting different results. (This is just another way of stating the point already nicely made by @Oleksandr R. Maybe I should leave well enough alone but I wanted to get in a reference of sorts.) $\endgroup$