Ok, so I've been working through some various problems in order to improve at my programming and I've had this question a couple of times and have no idea how to go about it:
'Give a simple algorithm to calculate the accuracy with which the mantissa of a floating point number can be represented'
Basically as I understand it, it wants me to get the computer to test it's own accuracy, which feels a bit paradoxical.
Can anyone help?
2 replies to this topic
#1
Posted 29 April 2011 - 09:34 AM
|
|
|
#2
Posted 29 April 2011 - 02:27 PM
Well, you could change the last bit in the binary representation, and then subtract that from the original.
#3
Posted 29 April 2011 - 03:02 PM
The significand (or mantissa) can be thought of as the fraction in a scientific notation, in a binary fraction form.
The level of proximity compared to that of a true value can be considered accuracy, so you may compute a value and compare to a reference value, or assume a result (such as Winged Panther's suggestion) and compare the actual computed value to that.
The level of proximity compared to that of a true value can be considered accuracy, so you may compute a value and compare to a reference value, or assume a result (such as Winged Panther's suggestion) and compare the actual computed value to that.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









