Top "Precision" questions

For questions related to numerical precision in programming.

Difference between toFixed() and toPrecision()?

I'm new to JavaScript and just discovered toFixed() and toPrecision() to round numbers. However, I can't figure out what the …

javascript rounding precision
How can I display numbers with higher precision in a MATLAB data cursor?

I have a problem with precision loss. I imported a set of values from a CSV file into MATLAB 7 using …

matlab plot precision datatip
How to properly round up half float numbers in Python?

I am facing a strange behavior of the round() function: for i in range(1, 15, 2): n = i / 2 print(n, "=>", round(…

python python-3.x floating-point rounding precision
C# DateTime.Now precision

I just ran into some unexpected behavior with DateTime.UtcNow while doing some unit tests. It appears that when you …

c# .net datetime precision time-precision
How to calculate precision and recall in Keras

I am building a multi-class classifier with Keras 2.02 (with Tensorflow backend),and I do not know how to calculate precision …

python precision keras precision-recall
C++ floating point precision

Possible Duplicate: Floating point inaccuracy examples double a = 0.3; std::cout.precision(20); std::cout << a << std::endl; …

c++ c floating-point precision floating-accuracy
T-SQL Decimal Division Accuracy

Does anyone know why, using SQLServer 2005 SELECT CONVERT(DECIMAL(30,15),146804871.212533)/CONVERT(DECIMAL (38,9),12499999.9999) gives me 11.74438969709659, but when I increase the decimal places …

tsql precision
Is there any way to get current time in nanoseconds using JavaScript?

So, I know I can get current time in milliseconds using JavaScript. But, is it possible to get the current …

javascript time precision time-precision
PHP - Floating Number Precision

$a = '35'; $b = '-34.99'; echo ($a + $b); Results in 0.009999999999998 What is up with that? I wondered why my …

php floating-point precision floating-accuracy
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