confirmed_editors
135
edits
AgentMuffin (talk | contribs) mNo edit summary |
AgentMuffin (talk | contribs) mNo edit summary |
||
| Line 4: | Line 4: | ||
When converting a {{w|Double-precision floating-point format|double-precision floating point number}} (a ''double'') to a {{w|Single-precision floating-point format|single-precision floating point number}} (a ''float''), some doubles will have to be {{w|Rounding|rounded}} to a nearby float. There is a discrepancy in the rounding mode used: | When converting a {{w|Double-precision floating-point format|double-precision floating point number}} (a ''double'') to a {{w|Single-precision floating-point format|single-precision floating point number}} (a ''float''), some doubles will have to be {{w|Rounding|rounded}} to a nearby float. There is a discrepancy in the rounding mode used: | ||
*The Nintendo 64 typically uses the {{w|Rounding#Rounding to the nearest integer|''round-to-nearest''}} mode. This means that if the double is not exactly equal to a float, it will round up or down to the float that is closest in value to the original number. This behavior is accurately emulated by most emulators and the Wii U VC. | *The [[Nintendo 64]] typically uses the {{w|Rounding#Rounding to the nearest integer|''round-to-nearest''}} mode. This means that if the double is not exactly equal to a float, it will round up or down to the float that is closest in value to the original number. This behavior is accurately emulated by most emulators and the Wii U VC. | ||
*The Wii VC instead effectively uses a {{w|Rounding#Rounding toward zero|''round-toward-zero''}} mode. This mode rounds all positive doubles down, and all negative doubles up, to the nearest float. | *The Wii VC instead effectively uses a {{w|Rounding#Rounding toward zero|''round-toward-zero''}} mode. This mode rounds all positive doubles down, and all negative doubles up, to the nearest float. | ||