# Most accurate representation of 19.55

Page 1 of 1

## 13 Replies - 1691 Views - Last Post: 26 October 2019 - 02:17 PM

### #1 dgenxxx

Reputation: 0
• Posts: 2
• Joined: 24-October 19

# Most accurate representation of 19.55

Posted 24 October 2019 - 01:41 PM

Hi,
so I've used a binary calculator to help me with a coursework. I made a conversion of 19.55 and the most accurate representation of that is 1.9549999237060546875E1. Unfortunately I was asked to provide a step by step analysis of how I got the answer. Any insight will be appreciated.
Is This A Good Question/Topic? 0

## Replies To: Most accurate representation of 19.55

### #2 modi123_1

• Suitor #2

Reputation: 15357
• Posts: 61,575
• Joined: 12-June 08

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 01:47 PM

Conversion from what to what?

### #3 jon.kiparsky

• Beginner

Reputation: 11688
• Posts: 19,859
• Joined: 19-March 11

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 01:47 PM

What have you got so far?

### #4 dgenxxx

Reputation: 0
• Posts: 2
• Joined: 24-October 19

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 01:54 PM

modi123_1, on 24 October 2019 - 01:47 PM, said:

Conversion from what to what?

19.55 = 1.9549999237060546875E1

### #5 Skydiver

• Code herder

Reputation: 7135
• Posts: 24,240
• Joined: 05-May 12

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 03:20 PM

dgenxxx, on 24 October 2019 - 04:41 PM, said:

Hi,
so I've used a binary calculator to help me with a coursework. I made a conversion of 19.55 and the most accurate representation of that is 1.9549999237060546875E1. Unfortunately I was asked to provide a step by step analysis of how I got the answer. Any insight will be appreciated.

Well you could tell your professor in exquisite detail about what website you went to, and that you typed in, and what buttons you clicked. Sounds like a step-by-step analysis to me.

What you really should do is how you would derive this value by hand instead of just using a binary calculator.

Perhaps this may help: What Every Computer Scientist Should Know About Floating-Point Arithmetic

### #6 Martyr2

• Programming Theoretician

Reputation: 5494
• Posts: 14,468
• Joined: 18-April 07

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 04:09 PM

I say ask macosxnerd101. He could tell you the math behind it and give you a detailed analysis and pie charts, bar charts, line charts and even intergalactic star charts. He is the local DIC math prophet who speaks the true words of thy math gods. But be careful when you ask, for if he damns you and casts you down you will find yourself if computational purgatory. May I suggest you come bearing some kind of compliment on his mathematical superiority and offer a tribute of a graphing calculator.

This post has been edited by Martyr2: 24 October 2019 - 04:10 PM

### #7 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12657
• Posts: 45,831
• Joined: 27-December 08

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 07:13 PM

The issue isn't representing 19.55. The issue comes from the calculations you did along the way, where precision was an issue at intermediary steps.

Quote

so I've used a binary calculator to help me with a coursework.

Are you sure 19.55 is the correct answer? Is this the answer you got when working things out by hand?

Quote

Unfortunately I was asked to provide a step by step analysis of how I got the answer.

This is not unfortunate. This means your instructor is expecting you to learn how to do things and understand the techniques, rather than to use tools that do things for you.

Quote

May I suggest you come bearing some kind of compliment on his mathematical superiority and offer a tribute of a graphing calculator.

I prefer the term "mathematical excellence" rather than "mathematical superiority." I think most people can be mathematically excellent!

### #8 jon.kiparsky

• Beginner

Reputation: 11688
• Posts: 19,859
• Joined: 19-March 11

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 07:42 PM

macosxnerd101, on 24 October 2019 - 09:13 PM, said:

I prefer the term "mathematical excellence" rather than "mathematical superiority." I think most people can be mathematically excellent! />

But surely "excellent" implies "above average", so this would imply that most people can be "mathematically above average", which is a contradiction.

Boom.

### #9 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12657
• Posts: 45,831
• Joined: 27-December 08

## Re: Most accurate representation of 19.55

Posted 24 October 2019 - 07:50 PM

We can replace excellent with words like proficient, competent, and good. I like to think people can become all of these things at math, and that this isn't something reserved for the gods and those who use amphetamines.

### #10 Dormilich

• 痛覚残留

Reputation: 4244
• Posts: 13,449
• Joined: 08-June 10

## Re: Most accurate representation of 19.55

Posted 25 October 2019 - 02:03 AM

jon.kiparsky, on 25 October 2019 - 04:42 AM, said:

But surely "excellent" implies "above average"

in most (commonly known) statistics, 50% (of the items in the set) are "above average".

### #11 jon.kiparsky

• Beginner

Reputation: 11688
• Posts: 19,859
• Joined: 19-March 11

## Re: Most accurate representation of 19.55

Posted 25 October 2019 - 07:41 AM

Indeed.

### #12 Martyr2

• Programming Theoretician

Reputation: 5494
• Posts: 14,468
• Joined: 18-April 07

## Re: Most accurate representation of 19.55

Posted 25 October 2019 - 04:18 PM

If you close your eyes, you can almost envision Mac, draped in robes of simple cotton and wearing worn sandals that were fashioned by an old woman, slowly walking and speaking the words which will become the math bible. He places his hand on the head of a young student and says "We can replace excellent with words like proficient, competent, and good. I like to think people can become all of these things at math, and that this isn't something reserved for the gods and those who use amphetamines."

This post has been edited by Martyr2: 25 October 2019 - 04:19 PM

### #13 sepp2k

• D.I.C Lover

Reputation: 2754
• Posts: 4,414
• Joined: 21-June 11

## Re: Most accurate representation of 19.55

Posted 26 October 2019 - 05:50 AM

dgenxxx, on 24 October 2019 - 10:41 PM, said:

I made a conversion of 19.55 and the most accurate representation of that is 1.9549999237060546875E1. Unfortunately I was asked to provide a step by step analysis of how I got the answer.

If you've read and understood everything in Skydiver's link, this should become easy, but since that article is maybe a bit heavy, here's another link addressing specifically how to convert a decimal number to float. So do that, convert the result back to a decimal number and you'll get your 19.549999237060546875.

modi123_1, on 24 October 2019 - 10:47 PM, said:

Conversion from what to what?

Presumably from a real number to a single precision IEEE binary floating point value (using double precision, the result would just be 19.55).

macosxnerd101, on 25 October 2019 - 04:13 AM, said:

The issue isn't representing 19.55.

It seems to me that's exactly the issue.

Quote

Are you sure 19.55 is the correct answer? Is this the answer you got when working things out by hand?

19.55 isn't the answer, it's the question (or rather "What's the most accurate floating point represenation of 19.55?" is the question). The answer is 19.549999237060546875 (again, assuming single precision) and OP is asking how to get to that answer without using tools.

### #14 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12657
• Posts: 45,831
• Joined: 27-December 08

## Re: Most accurate representation of 19.55

Posted 26 October 2019 - 02:16 PM

@sepp2k- The OP stated:

Quote

so I've used a binary calculator to help me with a coursework. I made a conversion of 19.55

This makes me think there is more to it than just converting 19.55 to binary.

Quote

19.55 isn't the answer, it's the question

It's the question the OP is asking, but I'm not entirely sold that this is the question being asked on the homework assignment. I could certainly be totally off-base here.

This post has been edited by macosxnerd101: 26 October 2019 - 02:17 PM