5.55 % 1
Keep in mind this won’t help you with floating point rounding problems. I.e., you may get:
0.550000000001
Or otherwise a little off the 0.55 you are expecting.
More Related Contents:
- Python JSON serialize a Decimal object
- Convert hex to float
- Add zeros to a float after the decimal point in Python
- Rounding a number in Python but keeping ending zeros
- Clarification on the Decimal type in Python
- Decimal place issues with floats and decimal.Decimal
- How to get largest possible precision? (Python – Decimal)
- Is floating point arbitrary precision available?
- How to suppress scientific notation when printing float values?
- How to display a float with two decimal places?
- Limiting floats to two decimal points
- range() for floats
- round() doesn’t seem to be rounding properly
- Binary representation of float in Python (bits not hex)
- Python Decimals format
- Convert floating point number to a certain precision, and then copy to string
- ValueError: could not convert string to float: id
- How to convert a decimal number into fraction?
- Convert Python strings into floats explicitly using the comma or the point as separators
- Convert Bytes to Floating Point Numbers?
- python floating number [duplicate]
- How to efficiently handle European decimal separators using the pandas read_csv function?
- Floating Point Limitations [duplicate]
- numpy float: 10x slower than builtin in arithmetic operations?
- Get the “bits” of a float in Python?
- What are some possible calculations with numpy or scipy that can return a NaN? [closed]
- How do you get the next value in the floating-point sequence? [duplicate]
- Print a float number in normal form, not exponential form / scientific notation [duplicate]
- Python “decimal” package gives wrong results
- How do I convert hex to decimal in Python? [duplicate]