Jump to content

What is 2 + 2?


flying_chair

Recommended Posts

Guest GroundHOG-2010

Its 2.

No its imposible, so therefore nothing. Because you can\'t have more than one decimal place.

On a slightly related note, Its Decimalception. (Decimal of a decimal).

Link to comment
Share on other sites

It\'s only incorrect if you have significant digits behind the decimal point. Which you don\'t, if all you have is a display showing integers. ;)

You totally missed my point. It\'s possible to use a display format and rounding to make 2 + 2 look like it equals 5. Hence my suggestion to always make sure your display method is appropriate for the values you are displaying. In programming, the variable types used need to be displayed appropriately if you want accuracy.

Arrr!

Capt\'n Skunky

Link to comment
Share on other sites

You totally missed my point. It\'s possible to use a display format and rounding to make 2 + 2 look like it equals 5.

Fun fact: It *does* equal 5, after all you can round it to 5 no problem (and your language of choice should have a round() method of some sort). It only doesn\'t equal 5 when you have significant digits behind the decimal point.

If it is the expected result, that\'s between you, your users, and your unit tests. :D

Hence my suggestion to always make sure your display method is appropriate for the values you are displaying. In programming, the variable types used need to be displayed appropriately if you want accuracy.

If you want accuracy in maths, you use something like Mathematica or Maple, since the IEEE 754 standard is inherently inaccurate. :)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...