Top "Precision" questions

For questions related to numerical precision in programming.

Java BigDecimal trigonometric methods

I am developing a mathematical parser which is able to evaluate String like '5+b*sqrt(c^2)'. I am …

java precision trigonometry bigdecimal
Emulate "double" using 2 "float"s

I am writing a program for an embedded hardware that only supports 32-bit single-precision floating-point arithmetic. The algorithm I am …

c++ algorithm floating-point precision double-double-arithmetic
Why double can store bigger numbers than unsigned long long?

The question is, I don't quite get why double can store bigger numbers than unsigned long long. Since both of …

c++ c floating-point precision floating-point-conversion
How to calculate decimal digits of precision based on the number of bits?

I am learning about floating point formats (IEEE). In the single precision floating point format ,it is mentioned that the …

floating-point precision decimal-point
ofstream reset precision

I'm using c++ to manipulate txt files. I need to write some numbers with a certain precision so I'm doing: …

c++ precision ofstream
Python scikit learn multi-class multi-label performance metrics?

I ran Random Forest classifier for my multi-class multi-label output variable. I got below output. My y_test values Degree …

python machine-learning scikit-learn precision multilabel-classification
sizeof long double and precision not matching?

Consider the following C code: #include <stdio.h> int main(int argc, char* argv[]) { const long double ld = 0.12345678901234567890123456789012345…

c floating-point precision long-double
How many double numbers are there between 0.0 and 1.0?

This is something that's been on my mind for years, but I never took the time to ask before. Many (…

random floating-point double precision
Why is a round-trip conversion via a string not safe for a double?

Recently I have had to serialize a double into text, and then get it back. The value seems to not …

c# double tostring precision