Top "Precision" questions

For questions related to numerical precision in programming.

What is a bad, decent, good, and excellent F1-measure range?

I understand F1-measure is a harmonic mean of precision and recall. But what values define how good/bad a …

performance machine-learning precision measurement precision-recall
How to check if float pandas column contains only integer numbers?

I have a dataframe df = pd.DataFrame(data=np.arange(10),columns=['v']).astype(float) How to make sure that the …

python pandas floating-point precision
QString:number with maximum 2 decimal places without trailing zero

I have a division like this: number / 1000.0 Sometimes it gives answers like 96.0000000001, sometimes the division works as expected. I want …

c++ qt precision qstring qtcore
PHP7.1 json_encode() Float Issue

This isn't a question as it is more of a be aware. I updated an application that uses json_encode() …

php json precision php-7.1
QString::toDouble() giving me double with wrong precision

I have a QString myNumber containing "09338.712001". When I do: myNumber.toDouble();, it returns 9338.71, but I want the double to be …

qt double precision qstring
ArithmeticException thrown during BigDecimal.divide

I thought java.math.BigDecimal is supposed to be The Answer™ to the need of performing infinite precision arithmetic with …

java precision division bigdecimal financial
How can I make sure a float will always be rounded up with PHP?

I want to make sure a float in PHP is rounded up if any decimal is present, without worrying about …

php floating-point rounding precision ceil
Why converting from float to double changes the value?

I've been trying to find out the reason, but I couldn't. Can anybody help me? Look at the following example. …

java floating-point double precision ieee-754
Unexpected results when working with very big integers on interpreted languages

I am trying to get the sum of 1 + 2 + ... + 1000000000, but I'm getting funny results in PHP and Node.js. PHP $sum = 0; …

php node.js precision integer-overflow integer-arithmetic
Why can't I get a p-value smaller than 2.2e-16?

I've found this issue with t-tests and chi-squared in R but I assume this issue applies generally to other tests. …

r precision r-faq