mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Added another floatToIntBits test
This commit is contained in:
parent
f5a168f584
commit
a0c12ad259
@ -212,6 +212,7 @@ public class Floats {
|
|||||||
expect(d == 12345.0);
|
expect(d == 12345.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test floatToIntBits
|
||||||
{
|
{
|
||||||
int orig = 0x7f800001;
|
int orig = 0x7f800001;
|
||||||
float NaN = Float.intBitsToFloat(orig);
|
float NaN = Float.intBitsToFloat(orig);
|
||||||
@ -220,6 +221,14 @@ public class Floats {
|
|||||||
expect(result == expected);
|
expect(result == expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int orig = 0x7f801001;
|
||||||
|
float NaN = Float.intBitsToFloat(orig);
|
||||||
|
int result = Float.floatToIntBits(NaN);
|
||||||
|
int expected = 0x7fc00000;
|
||||||
|
expect(result == expected);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
int orig = 0x00800001;
|
int orig = 0x00800001;
|
||||||
float number = Float.intBitsToFloat(orig);
|
float number = Float.intBitsToFloat(orig);
|
||||||
|
Loading…
Reference in New Issue
Block a user