|
What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought.
Started by Craig H on
, 17 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
In IEEE floating point) // if this symbol is not defined, NaNs are hugely different from regular numbers, infinities are 1 ULP away from +/- FLT_MAX #define INFINITE_INFINITIES 1 // test whether two IEEE that IEEE floats are properly....
|
|
I am maintaining a program that takes data from a PDP-11 (emulated!) program and puts it into a modern Windows-based system. We are having problems with some of the data values being reported as "1.#QNAN" and also "1.#QNB". The customer has recently revealed...
Answer Snippets (Read the full thread at stackoverflow):
So either the above document is using a strange know if PDP-11 supports these, but IEEE....
Whereas IEEE 754 uses excess 126 notation, so that the exponent bias for IEEE 754 is 127, not 126.
Used excess 128 notation for the exponent.
|
|
I have a stream of data which consists of 64-bit IEEE standard 754 floating point numbers. How would I read these as doubles in using C#? Is there a way to convert a long/ulong into a double?
Started by izb on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Double....
Alternatively, you can use a BinaryReader on top of the stream and take double values directly with its ReadDouble method .
You can use var v = Convert.ToDouble(ulongValue)
BitConverter.Int64BitsToDouble method is specifically designed to do this .
|
Ask your Facebook Friends
|
IEEE vhdl language reference manual only defined a limited set of standard packages.And it do not defined the functionalities on the standard types,such as STD_LOGIC.So there are no standard AND2, INV components/operator.
It seems that Altera's MAX+Plus...
Started by jcyang on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
To hardware.Then they tends to develop specific feature targeted on they own platform.So IEEE standard.
|
|
I read blogs and listen to podcasts, and I own many of the "classic" programming books. For the money, what kind of printed material would you say is the most valuable to keep current in software engineering -- books, or magazines from professional organizations...
Started by Laura on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
In contrast, I don't have the time....
There are some good magazines from both; there are some other I signed up for ACM and IEEE (nearly two decades ago, now), I was hoping to spot the seminal articles in print.
I belong to both ACM and IEEE.
|
|
According to the IEEE citation style reference, in case we cite urls the access time of the url should be indicated as well.
Does anybody know how to indicate this when using BibTeX?
Thanks, Zoltan
Started by zoltantoth on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This is what I usually....
You can check out the modified bib styles on urlbst .
While there is no 'access time' field, there is a 'note' field for many of the document types which may suit your purpose .
You can find the ieeetran bibtex style at the link .
|
|
Hi,
Could someone please help and tell me how to include IEEE mathematical functions in MSVC++6? I tried both and , but I still get these errors:
- error C2065: 'ilogbf' : undeclared identifier
- error C2065: 'scalbnf' : undeclared identifier
thanks in...
Started by mk on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Hard can that be to implement ? It turns out what the function is really about is IEEE floating point)d2; return ret; }
If you know you're on an IEEE system (and these days, you do), these functions.
|
|
Related to:
comparing ieee floats and doubles for equality Should we compare floating point numbers for equality against a relative error Most effective way for float and double comparison However with regard to 80 bit IEEE floats (see section 8.2) on...
Started by BCS on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Int i = std.math.feqrel!(real)(a,b); return i + count >= real.mant_dig; }
It gives the number of miss-matched bits ... .
My current solution is
bool Near(real a, real b, int count = 5) { // Returns the number of mantissa bits which are equal in x and y .
|
|
Hey!
So here is what we have, a custom IEEE based setup:
Consider a five-bit floating representation based on the IEEE floating point format with 1 sign bit, two exponent bits and 2 significand bits.
And a selection of bits that needed to be converted...
Started by oneAday on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For example, in IEEE single.
Significand field, called denormals , do not have an implicit leading bit .
|
|
I'm optimizing a sorting function for a numerics/statistics library based on the assumption that, after filtering out any NaNs and doing a little bit twiddling, floats can be compared as 32-bit ints without changing the result and doubles can be compared...
Started by dsimcha on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
IEEE 754, IBM added an IEEE 754 option to S/3....
Here are a brief overview of the FPA standards and their adoptions .
Other than flawed Pentiums , any x86 or x64-based CPU is using IEEE 754 as their floating-point arithmetic standard.
|