Top "Double" questions

Double is a primitive data type used to store fractional numbers that holds a double-precision floating-point (often 64 bits).

Conversion of a decimal to double number in C# results in a difference

Summary of the problem: For some decimal values, when we convert the type from decimal to double, a small fraction …

c# double decimal
In java, is it more efficient to use byte or short instead of int and float instead of double?

I've noticed I've always used int and doubles no matter how small or big the number needs to be. So …

java performance int double primitive-types
print double with precision 4 using cout

Possible Duplicate: Convert a double to fixed decimal point in C++ Suppose , I have double a = 0 and I want to …

c++ double precision cout
Java double vs BigDecimal for latitude/longitude

When storing latitudes/longitudes which are typically of the format: 44.087585 (i.e. max 2 numbers before the dot and 6dp) do …

java double geospatial latitude-longitude bigdecimal
Why would you use float over double, or double over long double?

I'm still a beginner at programming and I always have more questions than our book or internet searches can answer (…

c++ floating-point double long-double
Equals operator for zeros (BigDecimal / Double) in Java

A few interesting observations w.r.t equals operator on 0 and 0.0 new Double(0.0).equals(0) returns false, while new Double(0.0).equals(0.0) …

java double precision bigdecimal zero
Loss of precision - int -> float or double

I have an exam question I am revising for and the question is for 4 marks. "In java we can assign …

java floating-point double precision
How to print a double with full precision on iOS?

Test case: NSLog(@"%f", M_PI); NSLog(@"%@", [NSString stringWithFormat:@"%f", M_PI]); NSLog(@"%@", [NSNumber numberWithDouble:M_PI]); Results: 3.141593 3.141593 3.141592653589793 Conclusions: 1) Printing …

iphone cocoa-touch double precision nslog
How to normalize a mantissa

I'm trying to convert an int into a custom float, in which the user specifies the amount of bits reserved …

c floating-point double normalization
Odd behaviors when dividing doubles in Java

When I divide 317 by 219 in Java using doubles I get 1. For example: double b = 317/219; System.out.println(b); Output is: 1. …

java double divide