Time has come to have the fortran90 slamch and dlamch in the lapack package.
Jason (Riedy) wrote our ( ... his? :) ) ideas about it three years ago:
http://www.netlib.org/lapack-dev/lapack-coding/program-style.html#id2537289
Piotr (Luszczek) has written two subroutines, tested them on few platforms, collected the result on his webpage, and sent emails to the lapackers a few times. See:
http://www.cs.utk.edu/~luszczek/lapack/lamch.html
Theses slamch.f and dlamch.f subroutines were taken from PLASMA-2.1.0.
Change to the LAPACK library:
* move the current LAPACK subroutine slamch.f (resp dlamch.f) as
slamchf77.f (resp. dlamchf77.f),
* take the new slamch.f subroutines (resp. dlamch.f), remove the PLASMA
header, have a LAPACK header, and insert the new routines in the
library.
Minor:
* I would leave these routines compiled with the NOOPT flag.
Problem:
* CLAPACK: no idea how CLAPACK's going to handle this. CLAPACK can rely on
IEEE arithmetic, can relay on float.h, or can rely on the previous
xlamch.f