Top "Floating-point-conversion" questions

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

convert int to float to hex

Using scanf, each number typed in, i would like my program to print out two lines: for example byte order: …

c floating-point integer floating-point-conversion
Convert float to its binary representation (using MemoryStream?)

I'd like to convert a given float into its binary representation. I tried to write the float value into a …

c# binary memorystream floating-point-conversion
Why double can store bigger numbers than unsigned long long?

The question is, I don't quite get why double can store bigger numbers than unsigned long long. Since both of …

c++ c floating-point precision floating-point-conversion
C# float precision

Can anyone please explain to me what's happening here: using System; using System.Text; namespace ConsoleApplication1 { class Program { static void …

c# .net floating-point floating-point-precision floating-point-conversion
how can I force division to be floating point in Go?

I have the following code snippet: package main import("fmt";"flag") func main() { var a = flag.Int("a",0,"divident") var …

go command-line-arguments floating-point-conversion
Why does C++ promote an int to a float when a float cannot represent all int values?

Say I have the following: int i = 23; float f = 3.14; if (i == f) // do something i will be promoted to a …

c++ types int floating-point-conversion promotions
Correct algorithm to convert binary floating point "1101.11" into decimal (13.75)?

I have written a program in C to convert a floating point number represented in binary (1101.11) into a decimal (13.75). However, …

c floating-point floating-point-conversion
In Lua, what is #INF and #IND?

I'm fairly new to Lua. While testing I discovered #INF/#IND. However, I can't find a good reference that explains …

c floating-point lua floating-point-conversion
MySQL "greater than" condition sometimes returns row with equal value

I'm running into a baffling issue with a basic MySQL query. This is my table: id | rating 1 | 1317.17 2 | 1280.59 3 | 995.12 4 | 973.88 Now, I'm attempting …

mysql floating-point floating-accuracy floating-point-conversion
Best way of checking if a floating point is an integer

[There are a few questions on this but none of the answers are particularly definitive and several are out of …

c++ c++11 floating-point floating-point-conversion