📄 cos.h
字号:
#ifndef CYGONCE_LIBM_COS_H
#define CYGONCE_LIBM_COS_H
//===========================================================================
//
// cos.h
//
// Test vectors for testing of cos() 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/cos.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 COS_TOLERANCE 1.0E-04
static const Cyg_libm_test_double_vec_t cos_vec[] = {
// AUTOMATICALLY GENERATED VECTORS START
{ 1, 1077999148u, 2506787616u, 1090024059u, 3619148316u, 3219768992u, 2016484542u, 0, COS_TOLERANCE, 0},
{ 2, 3218153654u, 3176730980u, 1051524793u, 2993920299u, 1072618594u, 3065796144u, 0, COS_TOLERANCE, 0},
{ 3, 3239659803u, 2725707538u, 3232101343u, 2346810316u, 3220123085u, 3078481391u, 0, COS_TOLERANCE, 0},
{ 4, 1092554362u, 2088062470u, 3201242716u, 420891118u, 1072356932u, 4042953682u, 0, COS_TOLERANCE, 0},
{ 5, 3221200677u, 2636405208u, 1100049309u, 471635570u, 3218685952u, 3960691400u, 0, COS_TOLERANCE, 0},
{ 6, 1089363191u, 1746012320u, 1054478713u, 3333988501u, 1071809942u, 2003021887u, 0, COS_TOLERANCE, 0},
{ 7, 1047953160u, 183014794u, 3202039382u, 2016785810u, 1072693247u, 4294967264u, 0, COS_TOLERANCE, 0},
{ 8, 3213486034u, 2688957927u, 1046089230u, 2709029994u, 1072693080u, 978212037u, 0, COS_TOLERANCE, 0},
{ 9, 1058795730u, 624574473u, 1045840574u, 3473266330u, 1072693247u, 4243804449u, 0, COS_TOLERANCE, 0},
{ 10, 3204919842u, 1605286142u, 1068931671u, 4233776869u, 1072693247u, 4286151936u, 0, COS_TOLERANCE, 0},
{ 11, 1060343410u, 1857607719u, 3222889559u, 3417070006u, 1072693247u, 3893935114u, 0, COS_TOLERANCE, 0},
{ 12, 1103599987u, 3981151660u, 1088899021u, 1332651746u, 1071013305u, 501046957u, 0, COS_TOLERANCE, 0},
{ 13, 1085298022u, 3824988054u, 1066856791u, 2070129652u, 3220173381u, 184726421u, 0, COS_TOLERANCE, 0},
{ 14, 3207559790u, 1372884064u, 1080833116u, 3229926662u, 1072693247u, 4035214061u, 0, COS_TOLERANCE, 0},
{ 15, 1093826501u, 3217805330u, 3191644264u, 2014578707u, 1070032383u, 2277446950u, 0, COS_TOLERANCE, 0},
{ 16, 1102287487u, 265058758u, 3239903247u, 1630600647u, 3220176170u, 1767461132u, 0, COS_TOLERANCE, 0},
{ 17, 1071124229u, 1946677669u, 3198462609u, 926009897u, 1072546806u, 3686417449u, 0, COS_TOLERANCE, 0},
{ 18, 1072130299u, 2271884183u, 3203741999u, 2118617783u, 1072156649u, 125344954u, 0, COS_TOLERANCE, 0},
{ 19, 3194849109u, 213658772u, 3249401130u, 314151656u, 1072693247u, 4294967282u, 0, COS_TOLERANCE, 0},
{ 20, 3254112288u, 1564829925u, 3197817016u, 497230814u, 3219660486u, 631679371u, 0, COS_TOLERANCE, 0},
{ 21, 3216262634u, 2075329122u, 3231746400u, 169900577u, 1072686675u, 1944236140u, 0, COS_TOLERANCE, 0},
{ 22, 1049848642u, 541549344u, 1096608669u, 3119070100u, 1072693247u, 4294966919u, 0, COS_TOLERANCE, 0},
{ 23, 1085427055u, 567496114u, 1045286891u, 1969998540u, 3218068798u, 3978347379u, 0, COS_TOLERANCE, 0},
{ 24, 1060548195u, 1299369769u, 1049342524u, 4167404066u, 1072693247u, 3755541054u, 0, COS_TOLERANCE, 0},
{ 25, 3208865645u, 3348930841u, 1078472138u, 358457347u, 1072693247u, 2715744996u, 0, COS_TOLERANCE, 0},
{ 26, 1071069297u, 2192461366u, 1099527247u, 3184735642u, 1072556722u, 3142942532u, 0, COS_TOLERANCE, 0},
{ 27, 1052861772u, 331696577u, 3189610016u, 793242270u, 1072693247u, 4294947929u, 0, COS_TOLERANCE, 0},
{ 28, 3252528934u, 2322696981u, 1083791358u, 3020766674u, 3219826880u, 2920996550u, 0, COS_TOLERANCE, 0},
{ 29, 1044902177u, 252085215u, 3214426435u, 4139068910u, 1072693247u, 4294967295u, 0, COS_TOLERANCE, 0},
{ 30, 3222505725u, 105589263u, 1056316170u, 261630827u, 1069929628u, 2708927296u, 0, COS_TOLERANCE, 0},
{ 31, 1107213408u, 428765703u, 3251828686u, 2009972239u, 1072002281u, 2267619153u, 0, COS_TOLERANCE, 0},
{ 32, 1098568019u, 3517376586u, 3240257920u, 3304487302u, 3219267113u, 2318350078u, 0, COS_TOLERANCE, 0},
{ 33, 3233537912u, 237004814u, 3237899261u, 3364008659u, 3219363466u, 1974819849u, 0, COS_TOLERANCE, 0},
{ 34, 3195247552u, 472004928u, 3226869477u, 1186387580u, 1072693247u, 4294967272u, 0, COS_TOLERANCE, 0},
{ 35, 1054226850u, 4085763910u, 1106394906u, 2684738273u, 1072693247u, 4294840843u, 0, COS_TOLERANCE, 0},
{ 36, 1057053639u, 2055490142u, 3231581370u, 3879040079u, 1072693247u, 4290030503u, 0, COS_TOLERANCE, 0},
{ 37, 3188976647u, 3725731239u, 1061652681u, 591292963u, 1072693248u, 0u, 0, COS_TOLERANCE, 0},
{ 38, 3225014981u, 1147041027u, 3215417793u, 624695933u, 1072212739u, 3548552865u, 0, COS_TOLERANCE, 0},
{ 39, 3206052774u, 705725219u, 3238067573u, 1116238321u, 1072693247u, 4255683871u, 0, COS_TOLERANCE, 0},
{ 40, 3207367088u, 7287411u, 1045917232u, 116067742u, 1072693247u, 4081475017u, 0, COS_TOLERANCE, 0},
{ 41, 3240055222u, 3604989074u, 1066381836u, 545298780u, 1069174826u, 481201061u, 0, COS_TOLERANCE, 0},
{ 42, 3219080936u, 1681476121u, 1060345752u, 3553822398u, 1072447760u, 3428441333u, 0, COS_TOLERANCE, 0},
{ 43, 1102831658u, 3410480388u, 1052460275u, 1660607230u, 3220176232u, 3352970825u, 0, COS_TOLERANCE, 0},
{ 44, 1089216869u, 1494984673u, 3196647153u, 287894723u, 1072276901u, 3815649632u, 0, COS_TOLERANCE, 0},
{ 45, 1054885127u, 644548665u, 1081948134u, 2442134629u, 1072693247u, 4294696242u, 0, COS_TOLERANCE, 0},
{ 46, 1087554095u, 2312530895u, 3221584595u, 3379665576u, 1071648109u, 1545486473u, 0, COS_TOLERANCE, 0},
{ 47, 1096085375u, 3018463866u, 1086226574u, 404012923u, 3220172495u, 3110868414u, 0, COS_TOLERANCE, 0},
{ 48, 1064733299u, 1710279345u, 3251401196u, 3528946000u, 1072693216u, 1050271320u, 0, COS_TOLERANCE, 0},
{ 49, 1061536351u, 2164450219u, 1083520023u, 3312018966u, 1072693247u, 2309107782u, 0, COS_TOLERANCE, 0},
{ 50, 1057248676u, 2648986431u, 1050330591u, 1474376550u, 1072693247u, 4288192616u, 0, COS_TOLERANCE, 0},
{ 51, 3194422028u, 1839068700u, 1077406406u, 3013052171u, 1072693247u, 4294967288u, 0, COS_TOLERANCE, 0},
{ 52, 1046493630u, 772102380u, 3220729740u, 4219039958u, 1072693247u, 4294967292u, 0, COS_TOLERANCE, 0},
{ 53, 3229472221u, 3058618779u, 1046304788u, 3338676024u, 1072667959u, 113041016u, 0, COS_TOLERANCE, 0},
{ 54, 1051172137u, 506286854u, 1094907481u, 2217000199u, 1072693247u, 4294965066u, 0, COS_TOLERANCE, 0},
{ 55, 1082428310u, 1147428263u, 1065432625u, 3034786717u, 3219455129u, 3620968391u, 0, COS_TOLERANCE, 0},
{ 56, 1082016752u, 2844125311u, 1082985198u, 2561492677u, 1072492615u, 1705681540u, 0, COS_TOLERANCE, 0},
{ 57, 3211536916u, 704542600u, 3222902057u, 2762779203u, 1072693235u, 2601745815u, 0, COS_TOLERANCE, 0},
{ 58, 3199680614u, 184131949u, 3249723525u, 1667366082u, 1072693247u, 4294958646u, 0, COS_TOLERANCE, 0},
{ 59, 3223609598u, 3904224140u, 1067056698u, 2942159914u, 3219593076u, 1010749237u, 0, COS_TOLERANCE, 0},
{ 60, 1100636863u, 426114282u, 3209056785u, 1083606355u, 3219470205u, 1406323978u, 0, COS_TOLERANCE, 0},
{ 61, 1106165945u, 3774123863u, 1106787580u, 2722107965u, 1072606016u, 4140994146u, 0, COS_TOLERANCE, 0},
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -