07-31-2019 10:49 AM
I have problems with floating point in LAbVIEW.
Increasing A (A is defined in a range for convenience) I obtain different results on X.
This is probably due to floating point of START and END on Ramp pattern inputs.
How can I modify the diagram in order to obtain always the same (Right) result on X?
Solved! Go to Solution.
07-31-2019 08:50 PM - edited 07-31-2019 08:50 PM
Your N is not an integer and you are also running into limitations of floating point math.
A difference on the order of 1e-16 is not an error. DBL only gives you about 15 good decimal digits and errors accumulate with every operation.
08-01-2019 02:34 AM
Thank you Altenbach, yes is not an error, but when I put this diagram inside my program I obtain strange results because varying A I have in some cases X=0 or X=39.4 and Ramp Pattern has in some cases Nsamples=0 or Nsamples=1.
Do you have some suggestions how can I do? Truncating values?
08-01-2019 02:38 AM
@Mal123 wrote:
Thank you Altenbach, yes is not an error, but when I put this diagram inside my program I obtain strange results because varying A I have in some cases X=0 or X=39.4 and Ramp Pattern has in some cases Nsamples=0 or Nsamples=1.
Do you have some suggestions how can I do? Truncating values?
Well, a ramp with 0 or 1 samples is not a ramp. Make sure you have at least two points. What is a "strange result" can you be more descriptive?
Where are the inputs coming from and why are they so unreasonable?