Package netlib.util
Class D1mach
java.lang.Object
netlib.util.D1mach
public class D1mach
extends java.lang.Object
Übertragung der Fortran77-Routine D1MACH aus QUADPACK.
Bestimmt im Original einige maschinenabhängige Konstanten zur Gleitpunktarithmetik für diverse bekannte Architekturen. Hier für die in Java verwendete IEEE-754-Variante angepasst.
DOUBLE PRECISION FUNCTION D1MACH(I) INTEGER I C C DOUBLE-PRECISION MACHINE CONSTANTS C D1MACH( 1) = B**(EMIN-1), THE SMALLEST POSITIVE MAGNITUDE. C D1MACH( 2) = B**EMAX*(1 - B**(-T)), THE LARGEST MAGNITUDE. C D1MACH( 3) = B**(-T), THE SMALLEST RELATIVE SPACING. C D1MACH( 4) = B**(1-T), THE LARGEST RELATIVE SPACING. C D1MACH( 5) = LOG10(B) C
- Author:
- reiser
-
Method Summary
Modifier and Type Method Description static double
d1mach(int i)
DOUBLE-PRECISION MACHINE CONSTANTS.
-
Method Details
-
d1mach
public static double d1mach(int i)DOUBLE-PRECISION MACHINE CONSTANTS.- Parameters:
i
- 1..5- Returns:
- Throws:
java.lang.IllegalArgumentException
- iff i not in {1,2,3,4,5}.
-