mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8294198: Implement isFinite intrinsic for RISC-V
Reviewed-by: fyang, kvn
This commit is contained in:
parent
5f6ad926d7
commit
aeef3ecdc4
17 changed files with 316 additions and 48 deletions
|
@ -782,6 +782,7 @@ public final class Double extends Number
|
|||
* floating-point value, {@code false} otherwise.
|
||||
* @since 1.8
|
||||
*/
|
||||
@IntrinsicCandidate
|
||||
public static boolean isFinite(double d) {
|
||||
return Math.abs(d) <= Double.MAX_VALUE;
|
||||
}
|
||||
|
|
|
@ -604,6 +604,7 @@ public final class Float extends Number
|
|||
* floating-point value, {@code false} otherwise.
|
||||
* @since 1.8
|
||||
*/
|
||||
@IntrinsicCandidate
|
||||
public static boolean isFinite(float f) {
|
||||
return Math.abs(f) <= Float.MAX_VALUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue