top | item 39684957

(no title)

captaincrowbar | 1 year ago

Some people, when they have a problem, think, “I know, I’ll use floating point.” Now they have 1.9999998 problems.

discuss

order

beezle|1 year ago

Funny story from today while briefly on hold for a support rep. Got the standard 'we'll call you back if you want blah blah' followed by - I kid not - "you're estimated wait time for the next representative is 0.58333333 minutes"

At the end of the call I suggested if she can log a problem for IT to include this and that they should either round up or use seconds (I suspect it was 35 seconds)

__s|1 year ago

We had this issue with time estimates at work. JIRA field was minutes, which got printed as fractional hours elsewhere. Not good if you put 20 minutes. So suggestion was to use 15 minute intervals, but I pointed out that as long as you used multiples of 3 you'd get 2 digit results, so I'd round to multiples of 3 instead

recursive|1 year ago

Some numbers can be precisely represented using IEEE-754 floats. Two (2) is one of them.

eru|1 year ago

Yes, but not every calculation that yields 2, also yields 2 when performed in IEEE-754 floats.

markab21|1 year ago

I bet you have been waiting years to pull that one out of your pocket.

Well played sir! Nice shot man! :D