Skip to content

Commit 7c155df

Browse files
committed
Merge branch 'develop' into issue-439
2 parents 995235c + 220b028 commit 7c155df

File tree

4 files changed

+23
-20
lines changed

4 files changed

+23
-20
lines changed

hipparchus-core/src/conf/spotbugs-exclude-filter.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@
496496
<Class name="org.hipparchus.linear.DefaultIterativeLinearSolverEvent"/>
497497
<Class name="org.hipparchus.linear.IterativeLinearSolver"/>
498498
<Class name="org.hipparchus.linear.RealVector$Entry"/>
499+
<Class name="org.hipparchus.random.AbstractNonUniformGenerator"/>
499500
<Class name="org.hipparchus.random.GaussianRandomGenerator"/>
500501
<Class name="org.hipparchus.random.JDKRandomGenerator"/>
501502
<Class name="org.hipparchus.random.RandomAdaptor"/>

hipparchus-core/src/main/java/org/hipparchus/CalculusFieldElement.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ default double norm() {
605605
* to {@code base}, using a relative threshold. The default implementation
606606
* uses only the relative threshold with respect to he {@link #getReal()} part.
607607
* </p>
608+
* @param base base value to compare against
609+
* @param relativeThreshold relative threshold
608610
* @return true if instance is small with respect to reference
609611
* @since 5.0
610612
*/

hipparchus-core/src/main/java/org/hipparchus/analysis/interpolation/BicubicInterpolatingFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public <T extends CalculusFieldElement<T>> T value(T x, T y) {
358358

359359
/**
360360
* Compute the value of the bicubic polynomial.
361-
*
361+
* @param <T> type of the field elements
362362
* @param pX Powers of the x-coordinate.
363363
* @param pY Powers of the y-coordinate.
364364
* @param coeff Spline coefficients.

hipparchus-core/src/main/java/org/hipparchus/util/FastMath.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
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

Comments
 (0)