⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tanh.h

📁 eCos/RedBoot for勤研ARM AnywhereII(4510) 含全部源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#ifndef CYGONCE_LIBM_TANH_H
#define CYGONCE_LIBM_TANH_H
//===========================================================================
//
//      tanh.h
//
//      Test vectors for testing of tanh() math library function
//
//===========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
//
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//===========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s):   jlarmour
// Contributors:  jlarmour
// Date:        1998-02-13
// Purpose:     
// Description: 
// Usage:       #include "vectors/tanh.h"
//
//####DESCRIPTIONEND####
//
//===========================================================================


// CONFIGURATION

#include <pkgconf/libm.h>   // Configuration header


// INCLUDES

#include <cyg/infra/cyg_type.h>    // Common type definitions and support
#include "vectors/vector_support.h"// extra support for math tests

#define TANH_TOLERANCE 1.0E-04

static const Cyg_libm_test_double_vec_t tanh_vec[] = {

// AUTOMATICALLY GENERATED VECTORS START

{ 1, 1074853420u, 2506787616u, 1090024059u, 3619148316u, 1072692378u, 1014448409u, 0, TANH_TOLERANCE, 0},
{ 2, 3220250806u, 3176730980u, 1051524793u, 2993920299u, 3219735748u, 2718182253u, 0, TANH_TOLERANCE, 0},
{ 3, 3226028315u, 2725707538u, 3232101343u, 2346810316u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
{ 4, 1078922874u, 2088062470u, 3201242716u, 420891118u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3220097871u, 3599209765u, 0, TANH_TOLERANCE, 0},
{ 6, 1077828855u, 1746012320u, 1054478713u, 3333988501u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 7, 1066827528u, 183014794u, 3202039382u, 2016785810u, 1066827290u, 3880063380u, 0, TANH_TOLERANCE, 0},
{ 8, 3219777490u, 2688957927u, 1046089230u, 2709029994u, 3219483454u, 1125363282u, 0, TANH_TOLERANCE, 0},
{ 9, 1070330066u, 624574473u, 1045840574u, 3473266330u, 1070301526u, 862781689u, 0, TANH_TOLERANCE, 0},
{ 10, 3217502754u, 1605286142u, 1068931671u, 4233776869u, 3217486329u, 2145582745u, 0, TANH_TOLERANCE, 0},
{ 11, 1069780594u, 1857607719u, 3222889559u, 3417070006u, 1069770714u, 401076752u, 0, TANH_TOLERANCE, 0},
{ 12, 1081579891u, 3981151660u, 1088899021u, 1332651746u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 13, 1075860838u, 3824988054u, 1066856791u, 2070129652u, 1072693247u, 2842765918u, 0, TANH_TOLERANCE, 0},
{ 14, 3218045550u, 1372884064u, 1080833116u, 3229926662u, 3218004944u, 604169930u, 0, TANH_TOLERANCE, 0},
{ 15, 1078097861u, 3217805330u, 3191644264u, 2014578707u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 16, 1080267391u, 265058758u, 3239903247u, 1630600647u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 17, 1073221381u, 1946677669u, 3198462609u, 926009897u, 1072495714u, 2851802077u, 0, TANH_TOLERANCE, 0},
{ 18, 1073178875u, 2271884183u, 3203741999u, 2118617783u, 1072479881u, 1907835069u, 0, TANH_TOLERANCE, 0},
{ 19, 3214772053u, 213658772u, 3249401130u, 314151656u, 3214771516u, 3554579438u, 0, TANH_TOLERANCE, 0},
{ 20, 3228946464u, 1564829925u, 3197817016u, 497230814u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
{ 21, 3219408362u, 2075329122u, 3231746400u, 169900577u, 3219255158u, 2089286575u, 0, TANH_TOLERANCE, 0},
{ 22, 1067674434u, 541549344u, 1096608669u, 3119070100u, 1067673824u, 1035028173u, 0, TANH_TOLERANCE, 0},
{ 23, 1075989871u, 567496114u, 1045286891u, 1969998540u, 1072693247u, 4092220034u, 0, TANH_TOLERANCE, 0},
{ 24, 1069985379u, 1299369769u, 1049342524u, 4167404066u, 1069970014u, 3629210634u, 0, TANH_TOLERANCE, 0},
{ 25, 3218302829u, 3348930841u, 1078472138u, 358457347u, 3218265246u, 746156169u, 0, TANH_TOLERANCE, 0},
{ 26, 1073166449u, 2192461366u, 1099527247u, 3184735642u, 1072475030u, 1439194248u, 0, TANH_TOLERANCE, 0},
{ 27, 1068590412u, 331696577u, 3189610016u, 793242270u, 1068588660u, 2611487107u, 0, TANH_TOLERANCE, 0},
{ 28, 3229460262u, 2322696981u, 1083791358u, 3020766674u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
{ 29, 1066922273u, 252085215u, 3214426435u, 4139068910u, 1066921987u, 890588541u, 0, TANH_TOLERANCE, 0},
{ 30, 3221457149u, 105589263u, 1056316170u, 261630827u, 3220145390u, 1744926257u, 0, TANH_TOLERANCE, 0},
{ 31, 1082047584u, 428765703u, 3251828686u, 2009972239u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 32, 1079693651u, 3517376586u, 3240257920u, 3304487302u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 33, 3224100728u, 237004814u, 3237899261u, 3364008659u, 3220176895u, 4294953152u, 0, TANH_TOLERANCE, 0},
{ 34, 3214121920u, 472004928u, 3226869477u, 1186387580u, 3214121763u, 282713899u, 0, TANH_TOLERANCE, 0},
{ 35, 1068906914u, 4085763910u, 1106394906u, 2684738273u, 1068903266u, 2272328782u, 0, TANH_TOLERANCE, 0},
{ 36, 1069636551u, 2055490142u, 3231581370u, 3879040079u, 1069629628u, 2119989659u, 0, TANH_TOLERANCE, 0},
{ 37, 3213093895u, 3725731239u, 1061652681u, 591292963u, 3213093854u, 2954887285u, 0, TANH_TOLERANCE, 0},
{ 38, 3221869253u, 1147041027u, 3215417793u, 624695933u, 3220170315u, 2960779403u, 0, TANH_TOLERANCE, 0},
{ 39, 3217587110u, 705725219u, 3238067573u, 1116238321u, 3217567824u, 4085004597u, 0, TANH_TOLERANCE, 0},
{ 40, 3217852848u, 7287411u, 1045917232u, 116067742u, 3217822463u, 1655616480u, 0, TANH_TOLERANCE, 0},
{ 41, 3226423734u, 3604989074u, 1066381836u, 545298780u, 3220176896u, 0u, 0, TANH_TOLERANCE, 0},
{ 42, 3221178088u, 1681476121u, 1060345752u, 3553822398u, 3220094461u, 32790421u, 0, TANH_TOLERANCE, 0},
{ 43, 1080811562u, 3410480388u, 1052460275u, 1660607230u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 44, 1077682533u, 1494984673u, 3196647153u, 287894723u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 45, 1068516615u, 644548665u, 1081948134u, 2442134629u, 1068515181u, 4013422768u, 0, TANH_TOLERANCE, 0},
{ 46, 1077068335u, 2312530895u, 3221584595u, 3379665576u, 1072693247u, 4294967295u, 0, TANH_TOLERANCE, 0},
{ 47, 1079308159u, 3018463866u, 1086226574u, 404012923u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 48, 1071024755u, 1710279345u, 3251401196u, 3528946000u, 1070966559u, 4188915943u, 0, TANH_TOLERANCE, 0},
{ 49, 1070973535u, 2164450219u, 1083520023u, 3312018966u, 1070921017u, 98347496u, 0, TANH_TOLERANCE, 0},
{ 50, 1069831588u, 2648986431u, 1050330591u, 1474376550u, 1069820489u, 3042456577u, 0, TANH_TOLERANCE, 0},
{ 51, 3214344972u, 1839068700u, 1077406406u, 3013052171u, 3214344718u, 2604353982u, 0, TANH_TOLERANCE, 0},
{ 52, 1066416574u, 772102380u, 3220729740u, 4219039958u, 1066416485u, 838919666u, 0, TANH_TOLERANCE, 0},
{ 53, 3223180765u, 3058618779u, 1046304788u, 3338676024u, 3220176894u, 2606621599u, 0, TANH_TOLERANCE, 0},
{ 54, 1067949353u, 506286854u, 1094907481u, 2217000199u, 1067948256u, 3256716313u, 0, TANH_TOLERANCE, 0},
{ 55, 1076136854u, 1147428263u, 1065432625u, 3034786717u, 1072693247u, 4273443146u, 0, TANH_TOLERANCE, 0},
{ 56, 1075725296u, 2844125311u, 1082985198u, 2561492677u, 1072693246u, 3764088074u, 0, TANH_TOLERANCE, 0},
{ 57, 3218876948u, 704542600u, 3222902057u, 2762779203u, 3218766355u, 4000984321u, 0, TANH_TOLERANCE, 0},
{ 58, 3215409254u, 184131949u, 3249723525u, 1667366082u, 3215408207u, 1529188018u, 0, TANH_TOLERANCE, 0},
{ 59, 3221512446u, 3904224140u, 1067056698u, 2942159914u, 3220151345u, 2904148002u, 0, TANH_TOLERANCE, 0},
{ 60, 1080713919u, 426114282u, 3209056785u, 1083606355u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 61, 1082048697u, 3774123863u, 1106787580u, 2722107965u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},
{ 62, 1077519332u, 1377734762u, 1104232051u, 2377063483u, 1072693248u, 0u, 0, TANH_TOLERANCE, 0},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -