3939 * to native code present in many JVMs today and use of large tables.
4040 * The larger tables are lazily initialized on first use, so that the setup
4141 * time does not penalize methods that don't need them.
42- *
42+ *
4343 * <p>
4444 * Note that FastMath is
4545 * extensively used inside Hipparchus, so by calling some algorithms,
@@ -312,7 +312,7 @@ public class FastMath {
312312 private static final int MASK_NON_SIGN_INT = 0x7fffffff ;
313313
314314 /** Mask used to clear the non-sign part of a long. */
315- private static final long MASK_NON_SIGN_LONG = 0x7fffffffffffffffl ;
315+ private static final long MASK_NON_SIGN_LONG = 0x7fffffffffffffffL ;
316316
317317 /** Mask used to extract exponent from double bits. */
318318 private static final long MASK_DOUBLE_EXPONENT = 0x7ff0000000000000L ;
@@ -4359,9 +4359,9 @@ public static long unsignedMultiplyHigh(final long a, final long b) {
43594359
43604360 // split numbers in two 32 bits parts
43614361 final long aHigh = a >>> 32 ;
4362- final long aLow = a & 0xFFFFFFFFl ;
4362+ final long aLow = a & 0xFFFFFFFFL ;
43634363 final long bHigh = b >>> 32 ;
4364- final long bLow = b & 0xFFFFFFFFl ;
4364+ final long bLow = b & 0xFFFFFFFFL ;
43654365
43664366 // ab = aHigh * bHigh * 2⁶⁴ + (aHigh * bLow + aLow * bHigh) * 2³² + aLow * bLow
43674367 final long hh = aHigh * bHigh ;
@@ -4371,7 +4371,7 @@ public static long unsignedMultiplyHigh(final long a, final long b) {
43714371
43724372 // adds up everything in the above 64 bit part, taking care to avoid overflow
43734373 final long hlHigh = (hl1 >>> 32 ) + (hl2 >>> 32 );
4374- final long hlLow = (hl1 & 0xFFFFFFFFl ) + (hl2 & 0xFFFFFFFFl );
4374+ final long hlLow = (hl1 & 0xFFFFFFFFL ) + (hl2 & 0xFFFFFFFFL );
43754375 final long carry = (hlLow + (ll >>> 32 )) >>> 32 ;
43764376
43774377 return hh + hlHigh + carry ;
@@ -4403,10 +4403,10 @@ public static int divideExact(final int x, final int y) {
44034403 * @since 3.0
44044404 */
44054405 public static long divideExact (final long x , final long y ) {
4406- if (y == 0l ) {
4406+ if (y == 0L ) {
44074407 throw new MathRuntimeException (LocalizedCoreFormats .ZERO_DENOMINATOR );
44084408 }
4409- if (y == -1l && x == Long .MIN_VALUE ) {
4409+ if (y == -1L && x == Long .MIN_VALUE ) {
44104410 throw new MathRuntimeException (LocalizedCoreFormats .OVERFLOW_IN_FRACTION , x , y );
44114411 }
44124412 return x / y ;
@@ -4477,17 +4477,17 @@ public static int ceilDivExact(final int a, final int b) throws MathRuntimeExcep
44774477 */
44784478 public static long ceilDiv (final long a , final long b ) throws MathRuntimeException {
44794479
4480- if (b == 0l ) {
4480+ if (b == 0L ) {
44814481 throw new MathRuntimeException (LocalizedCoreFormats .ZERO_DENOMINATOR );
44824482 }
44834483
44844484 final long m = a % b ;
4485- if ((a ^ b ) < 0 || m == 0l ) {
4485+ if ((a ^ b ) < 0 || m == 0L ) {
44864486 // a and b have opposite signs, or division is exact
44874487 return a / b ;
44884488 } else {
44894489 // a and b have same signs and division is not exact
4490- return (a / b ) + 1l ;
4490+ return (a / b ) + 1L ;
44914491 }
44924492
44934493 }
@@ -4506,7 +4506,7 @@ public static long ceilDiv(final long a, final long b) throws MathRuntimeExcepti
45064506 */
45074507 public static long ceilDivExact (final long a , final long b ) throws MathRuntimeException {
45084508
4509- if (a == Long .MIN_VALUE && b == -1l ) {
4509+ if (a == Long .MIN_VALUE && b == -1L ) {
45104510 throw new MathRuntimeException (LocalizedCoreFormats .OVERFLOW_IN_FRACTION , a , b );
45114511 }
45124512
@@ -4589,12 +4589,12 @@ public static int ceilMod(final long a, final int b) throws MathRuntimeException
45894589 */
45904590 public static long ceilMod (final long a , final long b ) throws MathRuntimeException {
45914591
4592- if (b == 0l ) {
4592+ if (b == 0L ) {
45934593 throw new MathRuntimeException (LocalizedCoreFormats .ZERO_DENOMINATOR );
45944594 }
45954595
45964596 final long m = a % b ;
4597- if ((a ^ b ) < 0l || m == 0l ) {
4597+ if ((a ^ b ) < 0L || m == 0L ) {
45984598 // a and b have opposite signs, or division is exact
45994599 return m ;
46004600 } else {
@@ -4687,17 +4687,17 @@ public static long floorDiv(final long a, final int b) throws MathRuntimeExcepti
46874687 */
46884688 public static long floorDiv (final long a , final long b ) throws MathRuntimeException {
46894689
4690- if (b == 0l ) {
4690+ if (b == 0L ) {
46914691 throw new MathRuntimeException (LocalizedCoreFormats .ZERO_DENOMINATOR );
46924692 }
46934693
46944694 final long m = a % b ;
4695- if ((a ^ b ) >= 0l || m == 0l ) {
4695+ if ((a ^ b ) >= 0L || m == 0L ) {
46964696 // a and b have same sign, or division is exact
46974697 return a / b ;
46984698 } else {
46994699 // a and b have opposite signs and division is not exact
4700- return (a / b ) - 1l ;
4700+ return (a / b ) - 1L ;
47014701 }
47024702
47034703 }
@@ -4717,7 +4717,7 @@ public static long floorDiv(final long a, final long b) throws MathRuntimeExcept
47174717 */
47184718 public static long floorDivExact (final long a , final long b ) throws MathRuntimeException {
47194719
4720- if (a == Long .MIN_VALUE && b == -1l ) {
4720+ if (a == Long .MIN_VALUE && b == -1L ) {
47214721 throw new MathRuntimeException (LocalizedCoreFormats .OVERFLOW_IN_FRACTION , a , b );
47224722 }
47234723
@@ -4785,12 +4785,12 @@ public static int floorMod(final long a, final int b) {
47854785 */
47864786 public static long floorMod (final long a , final long b ) {
47874787
4788- if (b == 0l ) {
4788+ if (b == 0L ) {
47894789 throw new MathRuntimeException (LocalizedCoreFormats .ZERO_DENOMINATOR );
47904790 }
47914791
47924792 final long m = a % b ;
4793- if ((a ^ b ) >= 0l || m == 0l ) {
4793+ if ((a ^ b ) >= 0L || m == 0L ) {
47944794 // a and b have same sign, or division is exact
47954795 return m ;
47964796 } else {
0 commit comments