Display double in immediate window different in vs2013/vs2017 Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Use of var keyword in C#MSBuild doesn't copy references (DLL files) if using project dependencies in solutionVisual Studio Clicking Find Results Opens Code in Wrong WindowVisual Studio debugging/loading very slowVisual Studio displaying errors even if projects buildUpgrading vs2012 project to vs2013 still displays project as vs2012Found conflicts between different versions of the same dependent assembly that could not be resolvedUpgrade Visual Studio 2013 solutions to Visual Studio 2015How to disable the new debug window in VS2017Why does checked_array_iterator work without including <iterator> in VS2013 but fails in VS2017?

Using audio cues to encourage good posture

Compare a given version number in the form major.minor.build.patch and see if one is less than the other

Can you use the Shield Master feat to shove someone before you make an attack by using a Readied action?

Can anything be seen from the center of the Boötes void? How dark would it be?

For a new assistant professor in CS, how to build/manage a publication pipeline

Is CEO the profession with the most psychopaths?

First console to have temporary backward compatibility

If a VARCHAR(MAX) column is included in an index, is the entire value always stored in the index page(s)?

Can a party unilaterally change candidates in preparation for a General election?

How to find all the available tools in mac terminal?

If my PI received research grants from a company to be able to pay my postdoc salary, did I have a potential conflict interest too?

8 Prisoners wearing hats

Do I really need recursive chmod to restrict access to a folder?

Is there such thing as an Availability Group failover trigger?

Where are Serre’s lectures at Collège de France to be found?

How do pianists reach extremely loud dynamics?

Why wasn't DOSKEY integrated with COMMAND.COM?

Fantasy story; one type of magic grows in power with use, but the more powerful they are, they more they are drawn to travel to their source

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

Can an alien society believe that their star system is the universe?

How do I find out the mythology and history of my Fortress?

Why do we bend a book to keep it straight?

What is the meaning of the new sigil in Game of Thrones Season 8 intro?

What causes the direction of lightning flashes?



Display double in immediate window different in vs2013/vs2017



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Use of var keyword in C#MSBuild doesn't copy references (DLL files) if using project dependencies in solutionVisual Studio Clicking Find Results Opens Code in Wrong WindowVisual Studio debugging/loading very slowVisual Studio displaying errors even if projects buildUpgrading vs2012 project to vs2013 still displays project as vs2012Found conflicts between different versions of the same dependent assembly that could not be resolvedUpgrade Visual Studio 2013 solutions to Visual Studio 2015How to disable the new debug window in VS2017Why does checked_array_iterator work without including <iterator> in VS2013 but fails in VS2017?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have the following line of code:



double r = 0.000056262413896897934;


In visual studio 2013, I go to the immediate windows and type:



?r


And the results display the double's value:



0.000056262413896897934


However if I bring up the project in Visual Studio 2017 and type this in the immediate window:



?r


It display the following result (exponential format):



5.6262413896897934E-05


I would like Visual Studio 2017 to display the format in the same way as Visual Studio 2013 does:



0.000056262413896897934


Not just for this variable or this solution but as a permanent setting. Does anyone know how to do this? Thanks in advance










share|improve this question
























  • The DebuggerDisplay attribute at the assembly level, maybe. Not a permanent setting, but semi-permanent.

    – Amy
    Mar 8 at 19:31












  • Tools > Options > Debugging > General, tick the "Use the legacy C# and VB expression handlers" checkbox. It is permanent, but the message box does remind you that getting used to this minor quirk is easier today than it will be tomorrow.

    – Hans Passant
    Mar 9 at 9:28











  • It's best not to use the legacy C# and VB expression handlers. While changing that might change this behavior it has a far wider impact. While it's not ideal the workaround below is a better long term solution. If you'd like to change the default for all users open an issue on developer feedback. (Disclosure: I work on the VS debugger)

    – Andy Sterland
    Mar 9 at 18:08











  • Andy, you had it working so nice in vs2013! Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:45

















0















I have the following line of code:



double r = 0.000056262413896897934;


In visual studio 2013, I go to the immediate windows and type:



?r


And the results display the double's value:



0.000056262413896897934


However if I bring up the project in Visual Studio 2017 and type this in the immediate window:



?r


It display the following result (exponential format):



5.6262413896897934E-05


I would like Visual Studio 2017 to display the format in the same way as Visual Studio 2013 does:



0.000056262413896897934


Not just for this variable or this solution but as a permanent setting. Does anyone know how to do this? Thanks in advance










share|improve this question
























  • The DebuggerDisplay attribute at the assembly level, maybe. Not a permanent setting, but semi-permanent.

    – Amy
    Mar 8 at 19:31












  • Tools > Options > Debugging > General, tick the "Use the legacy C# and VB expression handlers" checkbox. It is permanent, but the message box does remind you that getting used to this minor quirk is easier today than it will be tomorrow.

    – Hans Passant
    Mar 9 at 9:28











  • It's best not to use the legacy C# and VB expression handlers. While changing that might change this behavior it has a far wider impact. While it's not ideal the workaround below is a better long term solution. If you'd like to change the default for all users open an issue on developer feedback. (Disclosure: I work on the VS debugger)

    – Andy Sterland
    Mar 9 at 18:08











  • Andy, you had it working so nice in vs2013! Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:45













0












0








0








I have the following line of code:



double r = 0.000056262413896897934;


In visual studio 2013, I go to the immediate windows and type:



?r


And the results display the double's value:



0.000056262413896897934


However if I bring up the project in Visual Studio 2017 and type this in the immediate window:



?r


It display the following result (exponential format):



5.6262413896897934E-05


I would like Visual Studio 2017 to display the format in the same way as Visual Studio 2013 does:



0.000056262413896897934


Not just for this variable or this solution but as a permanent setting. Does anyone know how to do this? Thanks in advance










share|improve this question
















I have the following line of code:



double r = 0.000056262413896897934;


In visual studio 2013, I go to the immediate windows and type:



?r


And the results display the double's value:



0.000056262413896897934


However if I bring up the project in Visual Studio 2017 and type this in the immediate window:



?r


It display the following result (exponential format):



5.6262413896897934E-05


I would like Visual Studio 2017 to display the format in the same way as Visual Studio 2013 does:



0.000056262413896897934


Not just for this variable or this solution but as a permanent setting. Does anyone know how to do this? Thanks in advance







c# visual-studio visual-studio-2017






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 15 at 10:12









marc_s

586k13011281272




586k13011281272










asked Mar 8 at 19:03









Robert SmithRobert Smith

311213




311213












  • The DebuggerDisplay attribute at the assembly level, maybe. Not a permanent setting, but semi-permanent.

    – Amy
    Mar 8 at 19:31












  • Tools > Options > Debugging > General, tick the "Use the legacy C# and VB expression handlers" checkbox. It is permanent, but the message box does remind you that getting used to this minor quirk is easier today than it will be tomorrow.

    – Hans Passant
    Mar 9 at 9:28











  • It's best not to use the legacy C# and VB expression handlers. While changing that might change this behavior it has a far wider impact. While it's not ideal the workaround below is a better long term solution. If you'd like to change the default for all users open an issue on developer feedback. (Disclosure: I work on the VS debugger)

    – Andy Sterland
    Mar 9 at 18:08











  • Andy, you had it working so nice in vs2013! Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:45

















  • The DebuggerDisplay attribute at the assembly level, maybe. Not a permanent setting, but semi-permanent.

    – Amy
    Mar 8 at 19:31












  • Tools > Options > Debugging > General, tick the "Use the legacy C# and VB expression handlers" checkbox. It is permanent, but the message box does remind you that getting used to this minor quirk is easier today than it will be tomorrow.

    – Hans Passant
    Mar 9 at 9:28











  • It's best not to use the legacy C# and VB expression handlers. While changing that might change this behavior it has a far wider impact. While it's not ideal the workaround below is a better long term solution. If you'd like to change the default for all users open an issue on developer feedback. (Disclosure: I work on the VS debugger)

    – Andy Sterland
    Mar 9 at 18:08











  • Andy, you had it working so nice in vs2013! Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:45
















The DebuggerDisplay attribute at the assembly level, maybe. Not a permanent setting, but semi-permanent.

– Amy
Mar 8 at 19:31






The DebuggerDisplay attribute at the assembly level, maybe. Not a permanent setting, but semi-permanent.

– Amy
Mar 8 at 19:31














Tools > Options > Debugging > General, tick the "Use the legacy C# and VB expression handlers" checkbox. It is permanent, but the message box does remind you that getting used to this minor quirk is easier today than it will be tomorrow.

– Hans Passant
Mar 9 at 9:28





Tools > Options > Debugging > General, tick the "Use the legacy C# and VB expression handlers" checkbox. It is permanent, but the message box does remind you that getting used to this minor quirk is easier today than it will be tomorrow.

– Hans Passant
Mar 9 at 9:28













It's best not to use the legacy C# and VB expression handlers. While changing that might change this behavior it has a far wider impact. While it's not ideal the workaround below is a better long term solution. If you'd like to change the default for all users open an issue on developer feedback. (Disclosure: I work on the VS debugger)

– Andy Sterland
Mar 9 at 18:08





It's best not to use the legacy C# and VB expression handlers. While changing that might change this behavior it has a far wider impact. While it's not ideal the workaround below is a better long term solution. If you'd like to change the default for all users open an issue on developer feedback. (Disclosure: I work on the VS debugger)

– Andy Sterland
Mar 9 at 18:08













Andy, you had it working so nice in vs2013! Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

– Robert Smith
Mar 11 at 18:45





Andy, you had it working so nice in vs2013! Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

– Robert Smith
Mar 11 at 18:45












1 Answer
1






active

oldest

votes


















0














As @Amy mentioned you can use DebuggerDisplay to change the appearance of an object in the debugger. As double is a built in type you can't just change its implementation. For cases like this the debugger has a feature where it will load in DebuggerDisplay implementations externally that are implemented in autoexp.cs



  1. Open (as admin) the autoexep.cs file which should be in a directory that looks like:
    C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal obviously that will change with your VS version but if you search for autoexp.cs you'll find it.

  2. In that file, add the code below: [assembly: DebuggerDisplay(@"ToString(""F17""),nq", Target = typeof(Double))] that's going to tell the debugger to basically execute ToString("F17") whenever it's displaying a double.

  3. Open a Developer Command Prompt as admin and navigate to where autoexp.cs is e.g. C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal

  4. Build the file with csc /t:library autoexp.cs

  5. Reload VS and run your scenario

You should then see something like:



Immediate window evaluating a double



More info on DebuggerDisplay is in our docs over at: https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2017 and more info on the ToString implementation for Double is over at: https://docs.microsoft.com/en-us/dotnet/api/system.double.tostring?view=netframework-4.7.2.






share|improve this answer























  • Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:47











  • I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

    – Andy Sterland
    Mar 11 at 21:07











  • Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

    – Andy Sterland
    Mar 12 at 6:13











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55069442%2fdisplay-double-in-immediate-window-different-in-vs2013-vs2017%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As @Amy mentioned you can use DebuggerDisplay to change the appearance of an object in the debugger. As double is a built in type you can't just change its implementation. For cases like this the debugger has a feature where it will load in DebuggerDisplay implementations externally that are implemented in autoexp.cs



  1. Open (as admin) the autoexep.cs file which should be in a directory that looks like:
    C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal obviously that will change with your VS version but if you search for autoexp.cs you'll find it.

  2. In that file, add the code below: [assembly: DebuggerDisplay(@"ToString(""F17""),nq", Target = typeof(Double))] that's going to tell the debugger to basically execute ToString("F17") whenever it's displaying a double.

  3. Open a Developer Command Prompt as admin and navigate to where autoexp.cs is e.g. C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal

  4. Build the file with csc /t:library autoexp.cs

  5. Reload VS and run your scenario

You should then see something like:



Immediate window evaluating a double



More info on DebuggerDisplay is in our docs over at: https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2017 and more info on the ToString implementation for Double is over at: https://docs.microsoft.com/en-us/dotnet/api/system.double.tostring?view=netframework-4.7.2.






share|improve this answer























  • Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:47











  • I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

    – Andy Sterland
    Mar 11 at 21:07











  • Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

    – Andy Sterland
    Mar 12 at 6:13















0














As @Amy mentioned you can use DebuggerDisplay to change the appearance of an object in the debugger. As double is a built in type you can't just change its implementation. For cases like this the debugger has a feature where it will load in DebuggerDisplay implementations externally that are implemented in autoexp.cs



  1. Open (as admin) the autoexep.cs file which should be in a directory that looks like:
    C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal obviously that will change with your VS version but if you search for autoexp.cs you'll find it.

  2. In that file, add the code below: [assembly: DebuggerDisplay(@"ToString(""F17""),nq", Target = typeof(Double))] that's going to tell the debugger to basically execute ToString("F17") whenever it's displaying a double.

  3. Open a Developer Command Prompt as admin and navigate to where autoexp.cs is e.g. C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal

  4. Build the file with csc /t:library autoexp.cs

  5. Reload VS and run your scenario

You should then see something like:



Immediate window evaluating a double



More info on DebuggerDisplay is in our docs over at: https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2017 and more info on the ToString implementation for Double is over at: https://docs.microsoft.com/en-us/dotnet/api/system.double.tostring?view=netframework-4.7.2.






share|improve this answer























  • Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:47











  • I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

    – Andy Sterland
    Mar 11 at 21:07











  • Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

    – Andy Sterland
    Mar 12 at 6:13













0












0








0







As @Amy mentioned you can use DebuggerDisplay to change the appearance of an object in the debugger. As double is a built in type you can't just change its implementation. For cases like this the debugger has a feature where it will load in DebuggerDisplay implementations externally that are implemented in autoexp.cs



  1. Open (as admin) the autoexep.cs file which should be in a directory that looks like:
    C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal obviously that will change with your VS version but if you search for autoexp.cs you'll find it.

  2. In that file, add the code below: [assembly: DebuggerDisplay(@"ToString(""F17""),nq", Target = typeof(Double))] that's going to tell the debugger to basically execute ToString("F17") whenever it's displaying a double.

  3. Open a Developer Command Prompt as admin and navigate to where autoexp.cs is e.g. C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal

  4. Build the file with csc /t:library autoexp.cs

  5. Reload VS and run your scenario

You should then see something like:



Immediate window evaluating a double



More info on DebuggerDisplay is in our docs over at: https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2017 and more info on the ToString implementation for Double is over at: https://docs.microsoft.com/en-us/dotnet/api/system.double.tostring?view=netframework-4.7.2.






share|improve this answer













As @Amy mentioned you can use DebuggerDisplay to change the appearance of an object in the debugger. As double is a built in type you can't just change its implementation. For cases like this the debugger has a feature where it will load in DebuggerDisplay implementations externally that are implemented in autoexp.cs



  1. Open (as admin) the autoexep.cs file which should be in a directory that looks like:
    C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal obviously that will change with your VS version but if you search for autoexp.cs you'll find it.

  2. In that file, add the code below: [assembly: DebuggerDisplay(@"ToString(""F17""),nq", Target = typeof(Double))] that's going to tell the debugger to basically execute ToString("F17") whenever it's displaying a double.

  3. Open a Developer Command Prompt as admin and navigate to where autoexp.cs is e.g. C:Program Files (x86)Microsoft Visual Studio16PreviewCommon7PackagesDebuggerVisualizersOriginal

  4. Build the file with csc /t:library autoexp.cs

  5. Reload VS and run your scenario

You should then see something like:



Immediate window evaluating a double



More info on DebuggerDisplay is in our docs over at: https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2017 and more info on the ToString implementation for Double is over at: https://docs.microsoft.com/en-us/dotnet/api/system.double.tostring?view=netframework-4.7.2.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 9 at 4:41









Andy SterlandAndy Sterland

1,062813




1,062813












  • Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:47











  • I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

    – Andy Sterland
    Mar 11 at 21:07











  • Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

    – Andy Sterland
    Mar 12 at 6:13

















  • Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

    – Robert Smith
    Mar 11 at 18:47











  • I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

    – Andy Sterland
    Mar 11 at 21:07











  • Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

    – Andy Sterland
    Mar 12 at 6:13
















Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

– Robert Smith
Mar 11 at 18:47





Andy, I really appreciate your response. Thank you very much! But very sad that exponential format is the default now. Why default to exponential format which is so tricky? At first glance someone could think it's 5.63... The truth being that the value is less than 1! Very unfriendly to the eyes, just my two cents.

– Robert Smith
Mar 11 at 18:47













I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

– Andy Sterland
Mar 11 at 21:07





I don't think it's a case of it being difficult. The ToString implementation contains a way to visualize the a double in either way (and many others). Again, it's not VS that changed here but the implementation in .NET that changed the ToString implementation. You can look at the .NET Core version at: github.com/dotnet/corefx/blob/…. Which just calls into NumberFormat/NumberToDouble. I have no idea when/if that changed. It could be worth opening an issue on GitHub to find out more.

– Andy Sterland
Mar 11 at 21:07













Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

– Andy Sterland
Mar 12 at 6:13





Though, one reason for the change might simply be that a exponent and mantissa more accurately represent a double than a decimal. Given that the underlying storage is that way.

– Andy Sterland
Mar 12 at 6:13



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55069442%2fdisplay-double-in-immediate-window-different-in-vs2013-vs2017%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved