disable Scientific notation

R

Ryan Liu

In C#, for a large float (9 digitals), how can I disable Scientific
notation. When it auto convert to Scientific notation, I lost accuracy.

Thanks a lot!
Ryan
 
M

Michael C

Ryan Liu said:
In C#, for a large float (9 digitals), how can I disable Scientific
notation. When it auto convert to Scientific notation, I lost accuracy.

You can't. A float has a certain number of digits accuracy so larger numbers
will lose some accuracy (or small numbers with lots of decimals). You could
use double or long. Note that double is not guarenteed to preserve your
accuracy either but will be better.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Ryan Liu said:
In C#, for a large float (9 digitals), how can I disable Scientific
notation. When it auto convert to Scientific notation, I lost accuracy.

Can you use double ? or even better, use Decimal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top