dhiltonp

failing floating point arithmetic

Dec 21st, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. start
  2. smoothed_difference=1.10
  3. difference_from_down=0.00
  4. smoothed_difference*2=2.20
  5. smoothed_difference*2+tmp=0.00
  6. (smoothed_difference*2+tmp)/3=0.00
  7. smoothed_difference=0.00
  8. difference_from_down=0.00
  9. start
  10. smoothed_difference=0.00
  11. difference_from_down=0.50
  12. smoothed_difference*2=0.00
  13. smoothed_difference*2+tmp=0.00
  14. (smoothed_difference*2+tmp)/3=0.00
  15. smoothed_difference=0.00
  16. difference_from_down=0.50
  17. start
  18. smoothed_difference=0.00
  19. difference_from_down=1.00
  20. smoothed_difference*2=0.00
  21. smoothed_difference*2+tmp=0.00
  22. (smoothed_difference*2+tmp)/3=0.00
  23. smoothed_difference=0.00
  24. difference_from_down=1.00
Advertisement
Add Comment
Please, Sign In to add comment