¡@

Home 

c++ Programming Glossary: floats

Best bignum library to solve Project Euler problems in C++?

http://stackoverflow.com/questions/1047203/best-bignum-library-to-solve-project-euler-problems-in-c

MAPM very good performance but it provides only big floats with the possibility to check if it is an integer. very good..

How do I convert between big-endian and little-endian values in C++?

http://stackoverflow.com/questions/105252/how-do-i-convert-between-big-endian-and-little-endian-values-in-c

unsigned values they work for signed integers as well. For floats and doubles it's more difficult as with plain integers as these.. in the host machines byte order. You can get little endian floats on big endian machines and vice versa. Other compilers have..

32-bit to 16-bit Floating Point Conversion

http://stackoverflow.com/questions/1659440/32-bit-to-16-bit-floating-point-conversion

bit numbers I just need to decrease the size of the 32 bit floats so they can be sent over the network. I am working in C . I.. frexp extracts the significand and exponent from normal floats or doubles then you need to decide what to do with exponents..

How to parse space-separated floats in C++ quickly?

http://stackoverflow.com/questions/17465061/how-to-parse-space-separated-floats-in-c-quickly

to parse space separated floats in C quickly I have a file with millions of lines each line.. I have a file with millions of lines each line has 3 floats separated by spaces. It takes a lot of time to read the file.. to split it but I don't know how to convert strings to floats and I'm not quite sure it's the best way. I don't mind if the..

Is there a standard sign function (signum, sgn) in C/C++?

http://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c

Edit Specifically I was looking for a function working on floats. c c math share improve this question Surprised no one.. T rather than an int which seems wasteful. Works for ints floats doubles unsigned shorts or any custom types constructible from..

Why does C++ disallow anonymous structs and unions?

http://stackoverflow.com/questions/2253878/why-does-c-disallow-anonymous-structs-and-unions

The use you demonstrate to have a struct containing three floats which can be referred to either by .v i or .x .y and .z I believe..

Why aren't static const floats allowed?

http://stackoverflow.com/questions/2454019/why-arent-static-const-floats-allowed

aren't static const floats allowed I have a class which is essentially just holds a bunch.. If a compiler supports in line initialization of floats it is an extension. As others pointed out the way to deal with..

What is a simple example of floating point/rounding error?

http://stackoverflow.com/questions/249467/what-is-a-simple-example-of-floating-point-rounding-error

in logarithmic scale . If computer could represent 32 bit floats without rounding error then for every k we should get zero...

Simple object detection using OpenCV and machine learning

http://stackoverflow.com/questions/6416117/simple-object-detection-using-opencv-and-machine-learning

CV_GRAY2BGR for size_t i 0 i circles total i round the floats to an int float p float cvGetSeqElem circles i cv Point center..

getline not asking for input?

http://stackoverflow.com/questions/6642865/getline-not-asking-for-input

somehow return i You can create a similar function for floats doubles and other things. Then when you need in int instead..

C++ random float number generation

http://stackoverflow.com/questions/686353/c-random-float-number-generation

random float number generation How do I generate random floats in C I thought I could take the integer rand and divide it by..

How can adding code to a loop make it faster?

http://stackoverflow.com/questions/688325/how-can-adding-code-to-a-loop-make-it-faster

pSource pDestination Now my lookup table is finite and floats are infinite so there's a possibility of off by one errors...

Floating point comparison

http://stackoverflow.com/questions/7011184/floating-point-comparison

Floats get promoted to doubles during comparison and since floats are less precise than doubles 0.7 as float is not the same as..

What's the best way to do fixed-point math? [closed]

http://stackoverflow.com/questions/79677/whats-the-best-way-to-do-fixed-point-math

and slow to fixed point. How I started was I changed floats to ints and whenever I needed to convert them I used x 8 to..