GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HPL_dlamch(3) HPL Library Functions HPL_dlamch(3)

HPL_dlamch - determines machine-specific arithmetic constants.

#include "hpl.h"

double HPL_dlamch( const HPL_T_MACH CMACH );

HPL_dlamch determines machine-specific arithmetic constants such as the relative machine precision (eps), the safe minimum (sfmin) such that 1 / sfmin does not overflow, the base of the machine (base), the precision (prec), the number of (base) digits in the mantissa (t), whether rounding occurs in addition (rnd=1.0 and 0.0 otherwise), the minimum exponent before (gradual) underflow (emin), the underflow threshold (rmin) base**(emin-1), the largest exponent before overflow (emax), the overflow threshold (rmax) (base**emax)*(1-eps).

CMACH (local input) const HPL_T_MACH
Specifies the value to be returned by HPL_dlamch = HPL_MACH_EPS, HPL_dlamch := eps (default) = HPL_MACH_SFMIN, HPL_dlamch := sfmin = HPL_MACH_BASE, HPL_dlamch := base = HPL_MACH_PREC, HPL_dlamch := eps*base = HPL_MACH_MLEN, HPL_dlamch := t = HPL_MACH_RND, HPL_dlamch := rnd = HPL_MACH_EMIN, HPL_dlamch := emin = HPL_MACH_RMIN, HPL_dlamch := rmin = HPL_MACH_EMAX, HPL_dlamch := emax = HPL_MACH_RMAX, HPL_dlamch := rmax

where

eps = relative machine precision, sfmin = safe minimum, base = base of the machine, prec = eps*base, t = number of digits in the mantissa, rnd = 1.0 if rounding occurs in addition, emin = minimum exponent before underflow, rmin = underflow threshold, emax = largest exponent before overflow, rmax = overflow threshold.

#include "hpl.h"

int main(int argc, char *argv[])
{ double eps; eps = HPL_dlamch( HPL_MACH_EPS ); printf("eps=%18.8e\n", eps); exit(0); return(0);
}

This function has been manually translated from the Fortran 77 LAPACK auxiliary function dlamch.f (version 2.0 -- 1992), that was itself based on the function ENVRON by Malcolm and incorporated suggestions by Gentleman and Marovich. See

Malcolm M. A., Algorithms to reveal properties of floating-point arithmetic., Comms. of the ACM, 15, 949-951 (1972).

Gentleman W. M. and Marovich S. B., More on algorithms that reveal properties of floating point arithmetic units., Comms. of the ACM, 17, 276-277 (1974).

December 2, 2018 HPL 2.3

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.