xref: /netbsd/external/lgpl3/mpc/dist/tests/agm.dat (revision aeacce61)
1# Data file for mpc_agm
2#
3# Copyright (C) 2022 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# The line format respects the parameter order in the function prototype as
21# follows:
22#
23# INEX_RE  INEX_IM  PREC_ROP_RE  ROP_RE  PREC_ROP_IM  ROP_IM  PREC_OP1_RE  OP1_RE  PREC_OP1_IM  OP1_IM  PREC_OP2_RE  OP2_RE  PREC_OP2_IM  OP2_IM  RND_RE  RND_IM
24#
25# See add.dat for more details.
26
27# special cases of 0
280 0 53 0 53 0  53 -1 53 0  53 1 53 0 U D
290 0 53 0 53 0  53  0 53 0  53 1 53 1 U D
300 0 53 0 53 0  53  1 53 0  53 0 53 0 U D
31
32# a=2^100 is real and b=-2^100+1 is close to -a, so that there is
33# cancellation in the first step
34+ + 1000 6.13343501065248469040220876057575735521422156659277284015370489065354785004941290892259011656852869912332814488649060620003153660129464591260581455777223198535415374247749106843365161158273510545819077989996849040655334209063638548567093807595920704639335161071221606819684075137748005838679614506936700e26 1000 2.78770347601954771576648332450140186390805588069947753721317890662882377009087432360024540561493332099222362713441719824215798470248682830506492225727606531299471177716509129100229573037698818619139314654444682343585665232750491711201076271867938956241318886378833024121607108490397434698394730099523728e28  200 1267650600228229401496703205376 53 0  200 -1267650600228229401496703205375 53 0 N N
35
36# a=2^100 is real and b=2^100+I is close to a, which causes a loss in the
37# error analysis when switching from a relative error to an absolute error
38# (in ulp) for the imaginary part.
39- + 1000 1.26765060022822940149670320537600000000000000000000000000000004930380657631323783823303533017413935457540219431393779814242309902707311989671728406142043830190405473381225698819654858454795973826194101850808953117443181105327393024632455534713154899279762797670267110875302148050274073504013709877973442e30 1000 4.99999999999999999999999999999999999999999999999999999999999980553077256683932165174799831937111748155461972746352709059016440615656003447359234530134921721757968337357997118603089092837261590319325008176491178329196315059130298011554852301129700508936432021390368960886831534563942526561512902959629403e-1  200 1267650600228229401496703205376 53 0 200 1267650600228229401496703205376 53 1 N N
40# similar case for the real part when b is close to -a
41+ + 1000 1.08467876592530886754246811029279356966981636533356136322144733028435886515931858750854237361072769893252665854960527081478235500456780213233344279303704706567669269542103227306403258182872546435486314875088697205523310058229087222631501223687780345556279062417814851470906262487893004445615660926562691e-2 1000 2.78905293895036173379978221446297250405753957415552085947732729471277330502161158283898862494994763003064685588768219963518185298464700472486122950691817734185737320652838329171863564571063685685782635224759876773001459257327047419614690899573835904762076822885023105374294261695197351950136206550502212e28  200 1267650600228229401496703205376 53 0 200 -1267650600228229401496703205376 53 1 N N
42
43# Non-trivial example with an angle pi
44- + 1000 1.73445281498669753232856248343970177809463913976908704246943226531366943181635177029314525135639219796336367868027485122390166753512240063464119645217760215308428521377134601470801777085207181315839747680069598739038938895527870204815473213761883712470377131465129627672808480329626971055399178573237530e0 1000 -7.02268113524478075006321405810247223230827765511578159358705685084648706076496079901548878047371750259623565862936612153628319914882054169762337559071422073790380764162955947410387987517205983880807663678020872942112760649464128028437895895107347428874323595807150644530530843707101528138966376736841785e0  20 1 20 2 20 -10 20 -20 N N
45
46# Non-trivial example with an angle 0
47- - 1000 4.25040709493227486172816431837313486679846786419019285967014766222375531274090378452528546078761717904588171358976686523664106901878258668543430057143043997188667013456002687950950378230536772481087956970495220412257232297324589475076978359364065270281502572385189827930845694706585008531069979410829173e0 1000 8.50081418986454972345632863674626973359693572838038571934029532444751062548180756905057092157523435809176342717953373047328213803756517337086860114286087994377334026912005375901900756461073544962175913940990440824514464594649178950153956718728130540563005144770379655861691389413170017062139958821658346e0  20 1 20 2 20 10 20 20 N N
48
49