Scroll to navigation

DCLREPSL(1) GFD Dennou Club Library DCLREPSL(1)

NAME

dclrepsl - calculate and suggest the machine epsilon (DCLREPSL) for DCL

SYNOPSIS

dclrepsl

DESCRIPTION

dclrepsl is a utility program included in the GFD Dennou Club Library (DCL). It empirically calculates the machine epsilon (precision) for single-precision floating-point numbers on the current architecture.

Based on the calculated precision, it outputs a recommended value for the DCL internal parameter DCLREPSL (Relative EPSiLon). This parameter is used throughout the library to determine the tolerance for floating-point comparisons (e.g., checking if two coordinate values are effectively equal).

The program iterates through a range of trigonometric values, manipulates the least significant bit of their binary representation, and measures the maximum relative error. The recommended value is typically set to 10 times this maximum error.

OPTIONS

dclrepsl accepts standard DCL runtime parameters, although they generally do not affect the calculation logic.

OUTPUT

The program prints a single line to the standard output indicating the recommended value for DCLREPSL in the GLPGET/GLPSET routines.

EXAMPLES

To run the calculation:

$ dclrepsl
< DCLREPSL > IN GLPGET/GLPSET SHOULD BE 1.192E-06

AUTHORS

Youhei SASAKI <uwabami@gfd-dennou.org>, GFD Dennou Club

SEE ALSO

dclpara(1), dclconfig(1)

2026-01-23 DCL 7.5.2