Java Code Examples for java.math.BigInteger#floatValue()
The following examples show how to use
java.math.BigInteger#floatValue() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: smallrye-graphql File: FloatScalar.java License: Apache License 2.0 | 6 votes |
public FloatScalar() { super(Scalars.GraphQLFloat.getName(), new Converter() { @Override public Object fromBigDecimal(BigDecimal bigDecimal) { return bigDecimal.floatValue(); } @Override public Object fromBigInteger(BigInteger bigInteger) { return bigInteger.floatValue(); } }, Float.class, float.class, Double.class, double.class); }
Example 2
Source Project: dragonwell8_jdk File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 3
Source Project: TencentKona-8 File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 4
Source Project: native-obfuscator File: PrimitiveConversionTests.java License: GNU General Public License v3.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 5
Source Project: jdk8u60 File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 6
Source Project: openjdk-jdk8u File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 7
Source Project: openjdk-jdk8u-backup File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 8
Source Project: openjdk-jdk9 File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 9
Source Project: jdk8u-jdk File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 10
Source Project: hottub File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 11
Source Project: openjdk-8-source File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 12
Source Project: openjdk-8 File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 13
Source Project: jdk8u_jdk File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 14
Source Project: jdk8u-jdk File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 15
Source Project: jdk8u-dev-jdk File: PrimitiveConversionTests.java License: GNU General Public License v2.0 | 5 votes |
public static int testFloatValue() { int failures = 0; for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) { float expected = Float.parseFloat(big.toString()); float actual = big.floatValue(); // should be bitwise identical if (Float.floatToRawIntBits(expected) != Float .floatToRawIntBits(actual)) { System.out.println(big + " " + expected + " " + actual); failures++; } } return failures; }
Example 16
Source Project: gravel File: LargeIntegerExtensions.java License: Apache License 2.0 | 4 votes |
public static float asFloat(BigInteger receiver) { return receiver.floatValue(); }
Example 17
Source Project: gravel File: FloatExtensions.java License: Apache License 2.0 | 4 votes |
public static float differenceFromLargeInteger_(float receiver, BigInteger argument) { return argument.floatValue() - receiver; }
Example 18
Source Project: gravel File: FloatExtensions.java License: Apache License 2.0 | 4 votes |
public static float productFromLargeInteger_(float receiver, BigInteger argument) { return argument.floatValue() * receiver; }
Example 19
Source Project: gravel File: FloatExtensions.java License: Apache License 2.0 | 4 votes |
public static float quotientFromLargeInteger_(float receiver, BigInteger argument) { return argument.floatValue() / receiver; }
Example 20
Source Project: gravel File: FloatExtensions.java License: Apache License 2.0 | 4 votes |
public static float sumFromLargeInteger_(float receiver, BigInteger argument) { return argument.floatValue() + receiver; }