Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Precision comparison in C#

using System;

float x = 1f / 3f;
double y = 1d / 3d;
decimal z = 1m / 3m;

Console.WriteLine(x); // 0.33333334
Console.WriteLine(y); // 0.3333333333333333
Console.WriteLine(z); // 0.3333333333333333333333333333
Comment

PREVIOUS NEXT
Code Example
Csharp :: .net open config file by name 
Csharp :: Cursor Invisibility 
Csharp :: .net ssh, wait command execute 
Csharp :: C# create delegate type at runtime 
Csharp :: Delete last modification on EntityFramework Core 
Csharp :: BOTON PARA CAMBIAR DE VIEW ASP.NET 
Csharp :: unity having virtual start 
Csharp :: identity-1.us-south.iam.test.cloud.ibm.com:443 
Csharp :: Mirror Inverse Program in c# 
Csharp :: sqldatareader get row count 
Csharp :: report background worker 
Csharp :: visual studio import excel get document created date 
Csharp :: c# get digits from int 
Csharp :: c# dubble comment 
Csharp :: nunjuck if exist 
Csharp :: unity how to get data of play session time in a text file? 
Csharp :: c# join array 
Csharp :: randon C# 
Csharp :: qrcode c# 
Csharp :: unity new input system get button down 
Csharp :: transform face player unity 
Csharp :: get selected rows gridcontrol devexpress 
Csharp :: rb.addforce 3d c# 
Csharp :: call action method on checkbox click asp.net mvc without pageload 
Html :: href do nothing 
Html :: create a mailto link html 
Html :: how to center html heading 
Html :: jquery $ is not defined 
Html :: html h1 left align 
Html :: bsc chain rpc 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =