darknesspic Posted December 28, 2017 Report Share Posted December 28, 2017 I'm using V280 with Visilogic 9.8.64 build0 I have the simple formula A(ML)x1=B(MF), I try A=2147483647 but the output = 2.147484E+9 why it's not 2.147483647E+9 because in the manual said maximum MF range is 3.402E37 Please advise, thank you. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 28, 2017 MVP 2022 Report Share Posted December 28, 2017 I rarely use floating point operands, but my understanding is that it is stored in a 32-bit memory location, just like an ML, but it has to store both the significand and the exponent in that 32-bit location. The situation with MF is that it trades off between range and precision. You cannot get 10 digits of precision in an MF. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted December 28, 2017 MVP 2022 Report Share Posted December 28, 2017 4 hours ago, Flex727 said: The situation with MF is that it trades off between range and precision. Unitronics uses single precision floating point- https://en.wikipedia.org/wiki/Single-precision_floating-point_format As described in the above link, once you get above 9 digits (as you show in your example) the magical exponent shift lever kicks in and knocks the number of significant digits down to 7 to allow for the exponent value. Which is why cleverly manipulated long integers are more accurate and precise than floating point in many applications. Joe T. 1 Quote Link to comment Share on other sites More sharing options...
darknesspic Posted December 29, 2017 Author Report Share Posted December 29, 2017 Thank you for your comments, I understood. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.