Click here to Skip to main content
15,888,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: Calculating decimal places - Pin
David Crow16-Oct-18 2:47
David Crow16-Oct-18 2:47 
GeneralRe: Calculating decimal places - Pin
ptr_Electron16-Oct-18 2:52
ptr_Electron16-Oct-18 2:52 
GeneralRe: Calculating decimal places - Pin
ptr_Electron16-Oct-18 3:03
ptr_Electron16-Oct-18 3:03 
GeneralRe: Calculating decimal places - Pin
David Crow16-Oct-18 3:06
David Crow16-Oct-18 3:06 
GeneralRe: Calculating decimal places - Pin
ptr_Electron16-Oct-18 3:14
ptr_Electron16-Oct-18 3:14 
QuestionRe: Calculating decimal places - Pin
David Crow16-Oct-18 3:20
David Crow16-Oct-18 3:20 
AnswerRe: Calculating decimal places - Pin
ptr_Electron16-Oct-18 3:29
ptr_Electron16-Oct-18 3:29 
GeneralRe: Calculating decimal places - Pin
David Crow16-Oct-18 3:38
David Crow16-Oct-18 3:38 
ptr_Electron wrote:

6.67 -? I need 2
6.9876 I need 4
1.67890 I need 5
Which are stored in memory as:
6.6699999999999999
6.9875999999999996
1.6789000000000001
or something very similar. Notice all the mantissas are the same length?

Is this just a trivial exercise for you, or are you ultimately planning on doing something with the result?

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles



modified 16-Oct-18 15:02pm.

GeneralRe: Calculating decimal places - Pin
leon de boer16-Oct-18 15:28
leon de boer16-Oct-18 15:28 
QuestionRe: Calculating decimal places - Pin
CPallini16-Oct-18 2:48
mveCPallini16-Oct-18 2:48 
AnswerRe: Calculating decimal places - Pin
ptr_Electron16-Oct-18 2:55
ptr_Electron16-Oct-18 2:55 
GeneralRe: Calculating decimal places - Pin
CPallini16-Oct-18 3:11
mveCPallini16-Oct-18 3:11 
QuestionUsing assignment operator = for a class with const memeber variables? Pin
Member 140109547-Oct-18 12:52
Member 140109547-Oct-18 12:52 
AnswerRe: Using assignment operator = for a class with const memeber variables? Pin
CPallini7-Oct-18 20:36
mveCPallini7-Oct-18 20:36 
AnswerRe: Using assignment operator = for a class with const memeber variables? Pin
Richard MacCutchan7-Oct-18 21:47
mveRichard MacCutchan7-Oct-18 21:47 
AnswerRe: Using assignment operator = for a class with const memeber variables? Pin
«_Superman_»9-Oct-18 1:51
professional«_Superman_»9-Oct-18 1:51 
QuestionAccess a pointer value changed in another class Pin
meerokh5-Oct-18 6:30
meerokh5-Oct-18 6:30 
AnswerRe: Access a pointer value changed in another class Pin
Victor Nijegorodov5-Oct-18 7:51
Victor Nijegorodov5-Oct-18 7:51 
GeneralRe: Access a pointer value changed in another class Pin
meerokh5-Oct-18 8:10
meerokh5-Oct-18 8:10 
GeneralRe: Access a pointer value changed in another class Pin
Victor Nijegorodov5-Oct-18 8:37
Victor Nijegorodov5-Oct-18 8:37 
AnswerRe: Access a pointer value changed in another class Pin
CPallini5-Oct-18 11:28
mveCPallini5-Oct-18 11:28 
GeneralMessage Closed Pin
9-Oct-18 23:31
Henry John9-Oct-18 23:31 
QuestionRe: Access a pointer value changed in another class Pin
CPallini9-Oct-18 23:58
mveCPallini9-Oct-18 23:58 
QuestionConversion from C to C#, Need C# Method Signature Pin
akvbsoft4-Oct-18 8:50
akvbsoft4-Oct-18 8:50 
AnswerRe: Conversion from C to C#, Need C# Method Signature Pin
vcbeaut4-Oct-18 16:48
vcbeaut4-Oct-18 16:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.