A Single Precision Real Arithmetic Utility Library

**R4LIB**
is a MATLAB library which
contains a number of utilities for "R4" or
"single precision real" arithmetic.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**R4LIB** is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.

C4LIB, a MATLAB library which implements certain elementary functions for single precision complex (C4) variables.

C8LIB, a MATLAB library which implements certain elementary functions for "C8" or double precision complex variables;

I4LIB, a MATLAB library which contains many utility routines, using "I4" or "single precision integer" arithmetic.

R8LIB, a MATLAB library which contains many utility routines, using "R8" or "double precision real" arithmetic.

- r4_abs.m, returns the absolute value of an R4;
- r4_acos.m, computes the inverse cosine;
- r4_acosh.m, computes the inverse hyperbolic cosine;
- r4_add.m, adds two R4's;
- r4_aint.m, truncates an R4 to an integer value;
- r4_asin.m, computes the inverse sine;
- r4_atan.m, computes the arctangent, with regard to the correct quadrant.
- r4_big.m, returns a "big" R4;
- r4_cas.m, returns the "casine" of an R4;
- r4_mant.m, returns the mantissa of an R4;
- r4_max.m, returns the maximum of two R4's;
- r4_min.m, returns the minimum of two R4's;
- r4_mod.m, returns the remainder of R4 division;
- r4_modp.m, returns the nonnegative remainder of R4 division;
- r4_mop.m, returns a power of -1 as an R4;
- r4_round_i4.m, rounds an R4, returning an I4.
- r4_sign.m, returns the sign of an R4.
- r4_sign3.m, returns the three-way sign of an R4.
- r4_swap.m, swaps two R4's.
- r4_tiny.m, returns a "tiny" R4;
- r4_uniform.m, returns a scaled pseudorandom R4;
- r4poly_val_horner.m, evaluates a polynomial in standard form;
- r4poly_value.m, evaluates a polynomial in standard form;
- r4vec_covar.m, computes the covariance of two R4VEC's.
- r4vec_print.m, prints an R4VEC;
- timestamp.m, prints the current YMDHMS date as a timestamp;

- r4lib_test.m, runs all the tests;
- r4lib_test_output.txt, the output file;
- r4lib_test001.m, tests R4_ABS;
- r4lib_test023.m, tests R4_SIGN and R4_SIGN3;

You can go up one level to the MATLAB source codes.