Top "Floating-point-conversion" questions

Anything related to converting a floating point number to and from other representations.

Number of significant digits for a floating point type

The description for type float in C mentions that the number of significant digits is 6. However, float f = 12345.6; and then …

c floating-point floating-point-conversion
Left shift Float type

get a complier error while trying to do float_val=float_val<<1; It gives out a error saying "…

c floating-point floating-point-conversion
How to convert a float string to an integer in python 3

I'm new to the whole coding thing...so here goes. Just trying to write a simple number guess game, but …

python python-3.x data-conversion floating-point-conversion
How to convert postgres column type from string to float

I have a rails app with a basic postgres db, but I realized that some of my columns are strings …

ruby-on-rails postgresql activerecord database-normalization floating-point-conversion
How to check if a user input is a float

I'm doing Learn Python the Hard Way exercise 35. Below is the original code, and we're asked to change it so …

python python-2.7 floating-point floating-point-conversion
Format a float to n decimal places and no trailing zeros

I want to display a float with the entire integer part and up to two decimals for the fractional part, …

go floating-point-conversion
Dividing 1/n always returns 0.0

I am trying to calculate p1=(1/1)*(1/2)*...*(1/n) but something is wrong and the printf gives me 0.000...0 #include <stdio.h&…

c floating-point integer floating-point-conversion
C - Serialization of the floating point numbers (floats, doubles)

How to convert a floating point number into a sequence of bytes so that it can be persisted in a …

c floating-point floating-point-conversion
Determining if a float has a fractional part?

Here is the problem: The game Totals can be played by any number of people. It starts with a total …

c floating-point floating-point-conversion
Writing an image with floating point values

My code reads an RGB image, processing it to produce floating-point results. How can I write these values as an …

image matlab file-io floating-point floating-point-conversion