Top "Floating-point" questions

Floating point numbers are approximations of real numbers that can represent larger ranges than integers but use the same amount of memory, at the cost of lower precision.

How to get numbers after decimal point?

How do I get the numbers after a decimal point? For example, if I have 5.55, how do i get .55?

python floating-point decimal
can't multiply sequence by non-int of type 'float'

level: beginner why do i get error "can't multiply sequence by non-int of type 'float'"? def nestEgVariable(salary, save, growthRates): …

python floating-point sequence
Dealing with float precision in Javascript

I have a large amount of numeric values y in javascript. I want to group them by rounding them down …

javascript floating-point double floating-accuracy numerical-methods
biggest integer that can be stored in a double

What is the biggest "no-floating" integer that can be stored in an IEEE 754 double type without losing precision ?

types floating-point double ieee-754
How to compare two floating point numbers in Bash?

I am trying hard to compare two floating point numbers within a bash script. I have to variables, e.g. …

bash floating-point comparison numbers
Format / Suppress Scientific Notation from Python Pandas Aggregation Results

How can one modify the format for the output from a groupby operation in pandas that produces scientific notation for …

python pandas floating-point scientific-notation number-formatting
How to suppress scientific notation when printing float values?

Here's my code: x = 1.0 y = 100000.0 print x/y My quotient displays as 1.00000e-05. Is there any way to suppress scientific …

python floating-point
Converting float to char*

How can I convert a float value to char* in C language?

c floating-point floating-point-conversion
Why is division in Ruby returning an integer instead of decimal value?

For example: 9 / 5 #=> 1 but I expected 1.8. How can I get the correct decimal (non-integer) result? Why is it returning 1 at …

ruby math floating-point division integer-division
For-loop vs while loop in R

I have noticed a curious thing whilst working in R. When I have a simple program that computes squares from 1 …

r for-loop floating-point while-loop