Home | History | Annotate | Line # | Download | only in tests
      1 # Data test file for mpc_cosh.
      2 #
      3 # Copyright (C) 2008, 2010 INRIA
      4 #
      5 # This file is part of GNU MPC.
      6 #
      7 # GNU MPC is free software; you can redistribute it and/or modify it under
      8 # the terms of the GNU Lesser General Public License as published by the
      9 # Free Software Foundation; either version 3 of the License, or (at your
     10 #o ption) any later version.
     11 #
     12 # GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY
     13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     14 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
     15 # more details.
     16 #
     17 # You should have received a copy of the GNU Lesser General Public License
     18 # along with this program. If not, see http://www.gnu.org/licenses/ .
     19 
     20 # See file sin.dat for the format description.
     21 
     22 # Special values, following ISO C99 standard, Annex G,
     23 # more precisely Section G.6.2.4 "The ccosh functions".
     24 
     25 # Rule [conj]: cosh(conj(z)) = conj(cosh(z))
     26 # Rule [even]: cosh(-z)      = cosh(z)
     27 
     28 # cosh(+0 + i*0) = 1 + i*0
     29 0 0 2 1 2 +0   2 +0 2 +0 N N
     30 # [conj]: cosh(+0 - i*0) = 1 - i*0
     31 0 0 2 1 2 -0   2 +0 2 -0 N N
     32 # [even]: cosh(-0 - i*0) = 1 + i*0
     33 0 0 2 1 2 +0   2 -0 2 -0 N N
     34 # [even+conj]: cosh(-0 + i*0) = 1 - i*0
     35 0 0 2 1 2 -0   2 -0 2 +0 N N
     36 
     37 # cosh(+0 + i*inf) = nan + i*0 (C99 says that the sign of the imaginary part
     38 # is left unspecified)
     39 0 0 2 nan 2 0   2 +0 2 +inf N N
     40 # [conj]: cosh(+0 - i*inf) = nan - i*0
     41 0 0 2 nan 2 0   2 +0 2 -inf N N
     42 # [even]: cosh(-0 - i*inf) = nan + i*0
     43 0 0 2 nan 2 0   2 -0 2 -inf N N
     44 # [even+conj]: cosh(-0 + i*inf) = nan - i*0
     45 0 0 2 nan 2 0   2 -0 2 +inf N N
     46 
     47 # cosh(+0 +i*nan) = nan + i*0 (C99 says that the sign of the imaginary part
     48 # is left unspecified)
     49 0 0 2 nan 2 0   2 +0 2 nan N N
     50 # [even]: cosh(-0 + i*nan) = nan + i*0
     51 0 0 2 nan 2 0   2 -0 2 nan N N
     52 
     53 # cosh(x + i*inf) = nan + i*nan for finite nonzero x
     54 0 0 2 nan 2 nan   2  1 2 inf N N
     55 0 0 2 nan 2 nan   2 -1 2 inf N N
     56 # [conj]: cosh(x - i*inf) = nan + i*nan
     57 0 0 2 nan 2 nan   2  1 2 -inf N N
     58 0 0 2 nan 2 nan   2 -1 2 -inf N N
     59 # [even] and [even+conj] are already considered for x=-1 < 0
     60 
     61 # cosh(x + i*nan) = nan + i*nan for finite nonzero x
     62 0 0 2 nan 2 nan   2  1 2 nan N N
     63 0 0 2 nan 2 nan   2 -1 2 nan N N
     64 # [conj] makes no sense since nan has no sign
     65 # [even] is already considered for x=-1 < 0
     66 
     67 # cosh(+inf + i*0) = +inf + i*0
     68 0 0 2 +inf 2 +0   2 +inf 2 +0   N N
     69 # [conj]: cosh(+inf - i*0) = +inf - i*0
     70 0 0 2 +inf 2 -0   2 +inf 2 -0   N N
     71 # [even]: cosh(-inf - i*0) = +inf + i*0
     72 0 0 2 +inf 2 +0   2 -inf 2 -0   N N
     73 # [even+conj]: cosh(-inf + i*0) = +inf - i*0
     74 0 0 2 +inf 2 -0   2 -inf 2 +0   N N
     75 
     76 # cosh(+inf + i*y) = +inf * (cos(y) + i*sin(y)) for finite non-zero y
     77 0 0 2 +inf 2 +inf   2 +inf 2 1    N N
     78 0 0 2 -inf 2 +inf   2 +inf 2 2    N N
     79 0 0 2 -inf 2 -inf   2 +inf 2 4    N N
     80 0 0 2 +inf 2 -inf   2 +inf 2 1024 N N
     81 # [conj]
     82 0 0 2 +inf 2 -inf   2 +inf 2 -1    N N
     83 0 0 2 -inf 2 -inf   2 +inf 2 -2    N N
     84 0 0 2 -inf 2 +inf   2 +inf 2 -4    N N
     85 0 0 2 +inf 2 +inf   2 +inf 2 -1024 N N
     86 # [even]
     87 0 0 2 +inf 2 +inf   2 -inf 2 -1    N N
     88 0 0 2 -inf 2 +inf   2 -inf 2 -2    N N
     89 0 0 2 -inf 2 -inf   2 -inf 2 -4    N N
     90 0 0 2 +inf 2 -inf   2 -inf 2 -1024 N N
     91 # [even+conj]
     92 0 0 2 +inf 2 -inf   2 -inf 2 1    N N
     93 0 0 2 -inf 2 -inf   2 -inf 2 2    N N
     94 0 0 2 -inf 2 +inf   2 -inf 2 4    N N
     95 0 0 2 +inf 2 +inf   2 -inf 2 1024 N N
     96 
     97 # cosh(+inf + i*inf) = +inf + i*nan (C99 leaves unspecified the sign of the
     98 # real part)
     99 0 0 2 inf 2 nan   2 +inf 2 +inf   N N
    100 # [conj]: cosh(+inf - i*inf) = +inf + i*nan
    101 0 0 2 inf 2 nan   2 +inf 2 -inf   N N
    102 # [even]: cosh(-inf - i*inf) = +inf + i*nan
    103 0 0 2 inf 2 nan   2 -inf 2 -inf   N N
    104 # [even+conj]: cosh(-inf + i*inf) = +inf + i*nan
    105 0 0 2 inf 2 nan   2 -inf 2 +inf   N N
    106 
    107 # cosh(+inf + i*nan) = +inf + i*nan
    108 0 0 2 +inf 2 nan   2 +inf 2 nan   N N
    109 # [conj] makes no sense since NaN has no sign
    110 # [even]: cosh(-inf + i*nan) = +inf + i*nan
    111 0 0 2 +inf 2 nan   2 -inf 2 nan   N N
    112 
    113 # cosh(nan + i*0) = nan - i*0 (C99 leaves unspecified the sign of the
    114 # imaginary part)
    115 0 0 2 nan 2 0   2 nan 2 +0   N N
    116 # [conj]: cosh(nan - i*0) = nan + i*0
    117 0 0 2 nan 2 0   2 nan 2 -0   N N
    118 
    119 # cosh(nan + i*y) = nan + i*nan for all nonzero y (including +/-inf)
    120 0 0 2 nan 2 nan   2 nan 2  1   N N
    121 0 0 2 nan 2 nan   2 nan 2 -1   N N
    122 0 0 2 nan 2 nan   2 nan 2 +inf   N N
    123 0 0 2 nan 2 nan   2 nan 2 -inf   N N
    124 
    125 # cosh(nan + i*nan) = nan + i*nan
    126 0 0 2 nan 2 nan   2 nan 2 nan   N N
    127 
    128 + + 53 0x10000000000001p-53 53 0x10000000000001p-52   53 0x1DA2E1BD2C9EBCp-53 53 0x138AADEA15829Fp-52 N N
    129 
    130 
    131 # huge values
    132 + - 53 +inf 53 -inf 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
    133 - - 53 -inf 53 -inf 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
    134