Freetest

Document Samsung SamFirm_A.i.o_v1.4.3

cmath_testcases.txt

Document143.5 KB0 downloads1/12/2026

Technical details

from catalog
Type
Document
Manufacturer
Samsung
Model
SamFirm_A.i.o_v1.4.3
Format
TXT
Size
143.5 KB
Added
1/12/2026
Downloads
0

About this file

Document Samsung SamFirm_A.i.o_v1.4.3 in TXT format, 143.5 KB. Catalog path: Lib / test. File details, compatibility and download access.

from catalog

Содержимое файла

Кодировка: utf-8
-- Testcases for functions in cmath.
--
-- Each line takes the form:
--
-- <testid> <function> <input_value> -> <output_value> <flags>
--
-- where:
--
--   <testid> is a short name identifying the test,
--
--   <function> is the function to be tested (exp, cos, asinh, ...),
--
--   <input_value> is a pair of floats separated by whitespace
--     representing real and imaginary parts of a complex number, and
--
--   <output_value> is the expected (ideal) output value, again
--     represented as a pair of floats.
--
--   <flags> is a list of the floating-point flags required by C99
--
-- The possible flags are:
--
--   divide-by-zero : raised when a finite input gives a
--     mathematically infinite result.
--
--   overflow : raised when a finite input gives a finite result whose
--     real or imaginary part is too large to fit in the usual range
--     of an IEEE 754 double.
--
--   invalid : raised for invalid inputs.
--
--   ignore-real-sign : indicates that the sign of the real part of
--     the result is unspecified; if the real part of the result is
--     given as inf, then both -inf and inf should be accepted as
--     correct.
--
--   ignore-imag-sign : indicates that the sign of the imaginary part
--     of the result is unspecified.
--
-- Flags may appear in any order.
--
-- Lines beginning with '--' (like this one) start a comment, and are
-- ignored.  Blank lines, or lines containing only whitespace, are also
-- ignored.

-- The majority of the values below were computed with the help of
-- version 2.3 of the MPFR library for multiple-precision
-- floating-point computations with correct rounding.  All output
-- values in this file are (modulo yet-to-be-discovered bugs)
-- correctly rounded, provided that each input and output decimal
-- floating-point value below is interpreted as a representation of
-- the corresponding nearest IEEE 754 double-precision value.  See the
-- MPFR homepage at http://www.mpfr.org for more information about the
-- MPFR project.

-- A minority of the test cases were generated with the help of
-- mpmath 0.19 at 100 bit accuracy (http://mpmath.org) to improve
-- coverage of real functions with real-valued arguments. These are
-- used in test.test_math.MathTests.test_testfile, as well as in
-- test_cmath.


--------------------------
-- acos: Inverse cosine --
--------------------------

-- zeros
acos0000 acos 0.0 0.0 -> 1.5707963267948966 -0.0
acos0001 acos 0.0 -0.0 -> 1.5707963267948966 0.0
acos0002 acos -0.0 0.0 -> 1.5707963267948966 -0.0
acos0003 acos -0.0 -0.0 -> 1.5707963267948966 0.0

-- branch points: +/-1
acos0010 acos 1.0 0.0 -> 0.0 -0.0
acos0011 acos 1.0 -0.0 -> 0.0 0.0
acos0012 acos -1.0 0.0 -> 3.1415926535897931 -0.0
acos0013 acos -1.0 -0.0 -> 3.1415926535897931 0.0

-- values along both sides of real axis
acos0020 acos -9.8813129168249309e-324 0.0 -> 1.5707963267948966 -0.0
acos0021 acos -9.8813129168249309e-324 -

Similar and related files