Commit f22107a6 authored by fridlmue's avatar fridlmue

Merge from master

parents 2ced8c3b f4438af2
No preview for this file type
......@@ -80,11 +80,11 @@ SRC_WP43S = \
10pow.c 2pow.c addition.c agm.c arccos.c arccosh.c arcsin.c arcsinh.c arctan.c arctanh.c arg.c \
ceil.c changeSign.c comparisonReals.c conjugate.c cos.c cosh.c cross.c cube.c cubeRoot.c \
cxToRe.c cpyx.c deltaPercent.c idiv.c idivr.c decomp.c dot.c \
division.c exp.c expMOne.c expt.c factorial.c floor.c fractionalPart.c gamma.c gcd.c \
imaginaryPart.c integerPart.c invert.c lcm.c ln.c lnPOne.c log10.c logxy.c lnbeta.c \
division.c exp.c expMOne.c expt.c factorial.c fib.c floor.c fractionalPart.c gamma.c gcd.c gd.c \
imaginaryPart.c integerPart.c invert.c lcm.c ln.c lnPOne.c log10.c logxy.c lnbeta.c beta.c \
log2.c magnitude.c mant.c max.c mean.c min.c minusOnePow.c modulo.c multiplication.c neighb.c parallel.c pcg_basic.c \
percent.c percentMRR.c percentPlusMG.c percentSigma.c percentT.c power.c prime.c \
random.c realPart.c remainder.c reToCx.c round.c roundi.c shiftDigits.c sign.c sin.c sinc.c sinh.c slvq.c square.c squareRoot.c \
random.c realPart.c remainder.c reToCx.c round.c roundi.c shiftDigits.c sign.c sin.c sinc.c sincpi.c sinh.c slvq.c square.c squareRoot.c \
subtraction.c swapRealImaginary.c tan.c tanh.c toPolar.c toRect.c ulp.c unitVector.c xthRoot.c\
variance.c wp34s.c) \
$(addprefix src/wp43s/logicalOps/, \
......
......@@ -18,8 +18,7 @@
* \file generateConstants.c
***********************************************/
#define IBM_DECIMAL 1
#define NUMBER_OF_CONSTANTS_IN_CNST_CATALOG 78
#define NUMBER_OF_CONSTANTS_IN_CNST_CATALOG 78
#include <stdlib.h>
#include <stdio.h>
......@@ -30,8 +29,9 @@
#include<unistd.h>
#endif // __APPLE__
#include "defines.h"
#if (IBM_DECIMAL == 1)
#define DECNUMDIGITS 39
#include "decimal128.h"
#include "decimal64.h"
#include "decDouble.h"
......@@ -380,8 +380,7 @@ void generateAllConstants(void) {
generateConstantArray("LbfToN", "+4.448221615260500000000000000000000000000000000000000000e+00"); // cnst122 newton = lbf × 9.80665 × 0.45359237
generateConstantArray("TorrToPa", "+1.333223684210526315789473684210526315789473684210526316e+02"); // cnst123 pascal = torr × 101325 / 760
#define MMHG_PA_133_3224
#ifdef MMHG_PA_133_3224
#if (MMHG_PA_133_3224 == 1)
generateConstantArray("MmhgToPa", "+1.333224000000000000000000000000000000000000000000000000e+02"); // cnst124 pascal = mm.Hg × 133.3224
generateConstantArray("InhgToPa", "+3.386388960000000000000000000000000000000000000000000000e+03"); // cnst125 pascal = in.Hg × 133.3224 × 25.4
#else
......
;*************************************************************
;*************************************************************
;** **
;** Beta(x, y) **
;** **
;*************************************************************
;*************************************************************
In: FL_SPCRES=0 FL_CPXRES=0 SD=0 RM=0 IM=2compl SS=4 WS=64
Func: fnBeta
;************************************************************************************************************************************************************
; Beta(Long Integer, *) -> Real or Complex
;************************************************************************************************************************************************************
;=======================================
; Beta(Long Integer, Long Integer) --> Real
;=======================================
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"50" RX=LonI:"15"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"15" RX=Real:"4.1792304818886240963166580947035618948687720183442e-16"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"15" RX=LonI:"50"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"50" RX=Real:"4.1792304818886240963166580947035618948687720183442e-16"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"1" RX=LonI:"1"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=LonI:"1" RX=Real:"1.0"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"50" RX=LonI:"-15"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"50" RX=LonI:"-15"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"-50" RX=LonI:"-15"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"-50" RX=LonI:"-15"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"50" RX=LonI:"0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"50" RX=LonI:"0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"-50" RX=LonI:"0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"-50" RX=LonI:"0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"0" RX=LonI:"0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"0" RX=LonI:"0"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"0" RX=LonI:"10"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"0" RX=LonI:"10"
;=======================================
; Beta(Long ;Integer, Real) --> Real & Complex
;=======================================
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"50" RX=Real:"15.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"15.0" RX=Real:"4.1792304818886240963166580947035618948687720183442e-16"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"15" RX=Real:"50.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"50.0" RX=Real:"4.1792304818886240963166580947035618948687720183442e-16"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"1" RX=Real:"1.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Real:"1.0" RX=Real:"1.0"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"10" RX=Real:"0.5"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Real:"0.5" RX=Real:"0.56754638550304184979107579726774773214401697373834"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"50" RX=Real:"-15.0"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"50" RX=Real:"-15.0"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"-50" RX=Real:"-15.0"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"-50" RX=Real:"-15.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"50" RX=Real:"0.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"50" RX=Real:"0.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"-50" RX=Real:"0.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"-50" RX=Real:"0.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"0" RX=Real:"0.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=LonI:"0" RX=Real:"0.0"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"0" RX=Real:"10.0"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"0" RX=Real:"10.0"
;=======================================
; Beta(Long ;Integer, Complex) --> Complex
;=======================================
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"123" RX=Cplx:"10.1234 i +1.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"10.1234 i +1.0" RX=Cplx:"-1.9156516789689009033479441604071022338763364123717e-16 i -1.0981090319623591998235800520365248437881786606317e-16"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"-123" RX=Cplx:"10.1234 i +1.0"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"-123" RX=Cplx:"10.1234 i +1.0"
In: WS=64 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"0" RX=Cplx:"10.1234 i +1.0"
Out: EC=24 FL_CPXRES=1 FL_ASLIFT=1 RY=LonI:"0" RX=Cplx:"10.1234 i +1.0"
;************************************************************************************************************************************************************
; Beta(Real, *) -> Real or Complex
;************************************************************************************************************************************************************
;=======================================
; Beta(Real, Long ;Integer) --> Real & Complex
;=======================================
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=LonI:"15"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"15" RX=Real:"4.1792304818886240963166580947035618948687720183442e-16"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"-50.0" RX=LonI:"15"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"-50.0" RX=LonI:"15"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=LonI:"-15"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=LonI:"-15"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"0.0" RX=LonI:"15"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"0.0" RX=LonI:"15"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=LonI:"0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=LonI:"0"
;=======================================
; Beta(Real, Real) --> Real
;=======================================
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=Real:"15.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"15.0" RX=Real:"4.1792304818886240963166580947035618948687720183442e-16"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"10.1234" RX=Real:"123.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"123.0" RX=Real:"2.3167502758677649086570957515035677049678099519947e-16"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"0.1234" RX=Real:"0.5678"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.5678" RX=Real:"9.1247906708930867990861315188576751319441546483164"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"54321.1234" RX=Real:"15.12345"
Out: EC=8 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"54321.1234" RX=Real:"15.12345"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"-50.1234" RX=Real:"15.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"-50.1234" RX=Real:"15.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"-50.0" RX=Real:"15.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"-50.0" RX=Real:"15.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=Real:"-15.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=Real:"-15.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"0.0" RX=Real:"15.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"0.0" RX=Real:"15.0"
In: WS=64 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=Real:"0.0"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RY=Real:"50.0" RX=Real:"0.0"
;*************************************************************
;*************************************************************
;** **
;** fib **
;** **
;*************************************************************
;*************************************************************
In: FL_SPCRES=0 FL_CPXRES=0 SD=0 RM=0 IM=2compl SS=4 WS=64
Func: fnFib
;=======================================
; fib(Long Integer) --> Long Integer
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"5"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"5" RX=LonI:"5"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"50"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"50" RX=LonI:"12586269025"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"500"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"500" RX=LonI:"139423224561697880139724382870407283950070256587697307264108962948325571622863290691557658876222521294125"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"4791"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"4791" RX=LonI:"81339113627586038220075190055247789192880568618630451707018330137861517389158662600956996694846174589801469761512161313215689806905310862985024337939085870965238560635970957792660824904392047271094122294793272484563464072049275313738096650483261684061366405464337657087693955674365623243244313144555525734930847697924533371594078067471044085863078048666920758081314479926308697764627559698033104575510557171344869183739238830679557713527392771191576405457289994077481332719403213634424769607167748620818075825244885846435557980209966356282547711846517397448804387979462291291567084251103673083221868154825314856311929454870166455136775912287273068264359301319801383022153785801110046531437989315467648852308299147172496144333940023447276613167612884771436229672376790405385432747154491541992332127813197768675502425697687895826665267674543412303600098536011986692552057857548702420851052304543203400542443453837366673606205740550355224688965493278830040099542233431719451611889064817728030544594803234"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"4792"
Out: EC=8 FL_CPXRES=0 FL_ASLIFT=1 RX=LonI:"4792"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"-10"
Out: EC=1 FL_CPXRES=0 FL_ASLIFT=1 RX=LonI:"-10"
;=======================================
; fib(Real) --> Real
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"5.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"5.0" RX=Real:"5.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"-5.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"-5.0" RX=Real:"5.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"50.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"50.0" RX=Real:"12586269025.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"500.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"500.0" RX=Real:"139423224561697880139724382870407283950070256587697307264108962948325571622863290691557658876222521294125.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"15.123456"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"15.123456" RX=Real:"647.33720983212998584329662806252879844404481357094"
;=======================================
; fib(Complex) --> Complex
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"5.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"5.0 i +0.0" RX=Cplx:"5.0 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"0.0 i +5.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"0.0 i +5.0" RX=Cplx:"1.1001753394113957140039959752692567569465145182321e+6 i +995584.9453708210360619360588992183204011923753151"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"10.12 i +5.67"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"010.12 i +5.67" RX=Cplx:"93328.050595462640024443804837801063243137790758942 i +3398.780140852028785707359264999671893140180299863"
;=======================================
; fib(Short Integer) --> Error
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=ShoI:"5#10"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RX=ShoI:"5#10"
;*************************************************************
;*************************************************************
;** **
;** gd **
;** **
;*************************************************************
;*************************************************************
In: FL_SPCRES=0 FL_CPXRES=0 SD=0 RM=0 IM=2compl SS=4 WS=64
Func: fnGd
;=======================================
; gd(Long Integer) --> Real
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"5"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"5" RX=Real:"1.5573206367260510221824217984759955188613216868781"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"-5"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"-5" RX=Real:"-1.5573206367260510221824217984759955188613216868781"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"0" RX=Real:"0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"1138"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"1138" RX=Real:"1.5707963267948966192313216916397514420985846996876"
;=======================================
; gd(Real) --> Real
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"5.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"5.0" RX=Real:"1.5573206367260510221824217984759955188613216868781"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"-5.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"-5.0" RX=Real:"-1.5573206367260510221824217984759955188613216868781"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"0.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.0" RX=Real:"0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"113.123"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"113.123" RX=Real:"1.5707963267948966192313216916397514420985846996874"
;=======================================
; gd(Complex) --> Complex
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"5.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"5.0 i +0.0" RX=Cplx:"1.5573206367260510221824217984759955188613216868781 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"-5.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"-5.0 i +0.0" RX=Cplx:"-1.5573206367260510221824217984759955188613216868781 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"0.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"0.0 i +0.0" RX=Cplx:"0.0 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"12.12 i +2.12"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"12.12 i +2.12" RX=Cplx:"-4.7123832910932760648398455880162103272549515895136 i +0.000009296074638373011846298231169602567"
;=======================================
; Errors
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=ShoI:"5#10"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RX=ShoI:"5#10"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Stri:"Hello"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=1 RX=Stri:"Hello"
;*************************************************************
;*************************************************************
;** **
;** invGd **
;** **
;*************************************************************
;*************************************************************
In: FL_SPCRES=0 FL_CPXRES=0 SD=0 RM=0 IM=2compl SS=4 WS=64
Func: fnInvGd
;=======================================
; invGd(Long Integer) --> Real
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"1"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"1" RX=Real:"1.2261911708835170708130609674719067527242483502207"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"-1"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"-1" RX=Real:"-1.2261911708835170708130609674719067527242483502207"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"0" RX=Real:"0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=LonI:"2"
Out: EC=1 FL_CPXRES=0 FL_ASLIFT=1 RX=LonI:"2"
;=======================================
; invGd(Real) --> Real
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"1.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"1.0" RX=Real:"1.2261911708835170708130609674719067527242483502207"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"-1.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"-1.0" RX=Real:"-1.2261911708835170708130609674719067527242483502207"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"0.0"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.0" RX=Real:"0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"1.123123"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"1.123123" RX=Real:"1.4799396848808398205688779769740381572046954210251"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"1.5"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"1.5" RX=Real:"3.3406775427983110033208126690376887603563221997771"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=0 RX=Real:"2.0"
Out: EC=1 FL_CPXRES=0 FL_ASLIFT=1 RX=Real:"2.0"
;=======================================
; invGd(Complex) --> Complex
;=======================================
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"1.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"1.0 i +0.0" RX=Cplx:"1.2261911708835170708130609674719067527242483502207 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"-1.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"-1.0 i +0.0" RX=Cplx:"-1.2261911708835170708130609674719067527242483502207 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"0.0 i +0.0"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"0.0 i +0.0" RX=Cplx:"0.0 i +0.0"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"10.1 i +1.1"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"10.1 i +1.1" RX=Cplx:"-0.3937937025593220407550795186673637770550460379592 i +2.0996750777989768826465605888615116786150868667919"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"10.123 i +1.123"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"10.123 i +1.123" RX=Cplx:"-0.3979828675720699724232611646688464390241930297808 i +2.0792514876826946716043489109378118158985532055787"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"-10.123 i +1.123"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"-10.123 i +1.123" RX=Cplx:"0.3979828675720699724232611646688464390241930297808 i +2.0792514876826946716043489109378118158985532055787"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"10.123 i -1.123"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"10.123 i -1.123" RX=Cplx:"-0.3979828675720699724232611646688464390241930297808 i -2.0792514876826946716043489109378118158985532055787"
In: AM=DEG FL_ASLIFT=1 FL_CPXRES=1 RX=Cplx:"-10.123 i -1.123"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"-10.123 i -1.123" RX=Cplx:"0.3979828675720699724232611646688464390241930297808 i -2.0792514876826946716043489109378118158985532055787"
;*************************************************************
;*************************************************************
;** **
;** sincpi **
;** **
;*************************************************************
;*************************************************************
In: FL_SPCRES=0 FL_CPXRES=0 SD=0 RM=0 IM=2compl SS=4 WS=64
Func: fnSincpi
;=======================================
; sincpi(Long Integer) --> Real34
;=======================================
In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=LonI:"5"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"5" RX=Real:"0"
In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=LonI:"3605"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"3605" RX=Real:"0"
In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=LonI:"-3595"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"-3595" RX=Real:"0"
In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=LonI:"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" RX=Real:"0"
In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=LonI:"-314159265358979323846264338327950300314159265358979323846264338327950"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=LonI:"-314159265358979323846264338327950300314159265358979323846264338327950" RX=Real:"0"
;=======================================
; sinc(Time)
;=======================================
;=======================================
; sinc(Date)
;=======================================
;=======================================
; sinc(String) --> Error24
;=======================================
In: FL_ASLIFT=0 RX=Stri:"String test"
Out: EC=24 FL_ASLIFT=0 RX=Stri:"String test"
;=======================================
; sinc(Real16 Matrix)
;=======================================
;=======================================
; sinc(Complex16 Matrix)
;=======================================
;=======================================
; sinc(Short Integer) --> Error24
;=======================================
In: FL_ASLIFT=0 FL_CPXRES=0 RX=ShoI:"5#7"
Out: EC=24 FL_CPXRES=0 FL_ASLIFT=0 RX=ShoI:"5#7"
;=======================================
; sinc(Real34) --> Real34
;=======================================
;In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=Real:"0.0001"
;Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.0001" RX=Real:"0.9999999835506594126919779728593888366342895938658835096197814403"
;In: AM=DEG FL_ASLIFT=0 FL_CPXRES=0 RX=Real:"0.0001":RAD
;Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.0001":RAD RX=Real:"1"
In: AM=GRAD FL_ASLIFT=0 FL_CPXRES=0 RX=Real:"0.0001":DEG
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.0001":DEG RX=Real:"0.999999999999492304300355562994232458671966591944724390947855"
In: AM=DEG FL_ASLIFT=0 FL_CPXRES=0 RX=Real:"0.0001"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"0.0001" RX=Real:"0.9999999835506594126919779728593888366342895938658835096197814403"
; NaN
In: FL_ASLIFT=0 FL_CPXRES=0 RX=Real:"NaN":RAD
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"NaN":RAD RX=Real:"NaN"
In: FL_ASLIFT=0 FL_CPXRES=0 RX=Real:"NaN"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"NaN" RX=Real:"NaN"
; Infinity
In: FL_ASLIFT=0 FL_CPXRES=0 FL_SPCRES=1 RX=Real:"inf":DEG
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"inf":DEG RX=Real:"0"
In: FL_ASLIFT=0 FL_CPXRES=0 FL_SPCRES=1 RX=Real:"inf":MULTPI
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"inf":MULTPI RX=Real:"0"
In: FL_ASLIFT=0 FL_CPXRES=0 FL_SPCRES=1 RX=Real:"-inf":RAD
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"-inf":RAD RX=Real:"0"
In: FL_ASLIFT=0 FL_CPXRES=0 FL_SPCRES=1 RX=Real:"inf"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"inf" RX=Real:"0"
In: FL_ASLIFT=0 FL_CPXRES=0 FL_SPCRES=1 RX=Real:"inf"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"inf" RX=Real:"0"
In: FL_ASLIFT=0 FL_CPXRES=0 FL_SPCRES=1 RX=Real:"-inf"
Out: EC=0 FL_CPXRES=0 FL_ASLIFT=1 RL=Real:"-inf" RX=Real:"0"
;=======================================
; sinc(Complex34) --> Complex34
;=======================================
In: AM=RAD FL_ASLIFT=0 FL_CPXRES=0 RX=Cplx:"1.973521294339502163534158665819178 i -2.419155134996809103687033203262218"
Out: EC=0 FL_CPXRES=1 FL_ASLIFT=1 RL=Cplx:"1.973521294339502163534158665819178 i -2.419155134996809103687033203262218" RX=Cplx:"73.30765508782941569717089533225506 i -70.72657028341247985391812865164582"
......@@ -94,6 +94,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnExpM1", fnExpM1 },
{"fnExpt", fnExpt },
{"fnFactorial", fnFactorial },
{"fnFib", fnFib },
{"fnFillStack", fnFillStack },
{"fnFloor", fnFloor },
{"fnFp", fnFp },
......@@ -101,6 +102,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnFreeMemory", fnFreeMemory },
{"fnGamma", fnGamma },
{"fnGcd", fnGcd },
{"fnGd", fnGd },
{"fnGetIntegerSignMode", fnGetIntegerSignMode },
{"fnGetLocR", fnGetLocR },
{"fnGetRoundingMode", fnGetRoundingMode },
......@@ -111,6 +113,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnIDivR", fnIDivR },
{"fnImaginaryPart", fnImaginaryPart },
{"fnInvert", fnInvert },
{"fnInvGd", fnInvGd },
{"fnIp", fnIp },
{"fnIsPrime", fnIsPrime },
{"fnLcm", fnLcm },
......@@ -121,6 +124,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnLog2", fnLog2 },
{"fnLogXY", fnLogXY },
{"fnLnBeta", fnLnBeta },
{"fnBeta", fnBeta },
{"fnLogicalAnd", fnLogicalAnd },
{"fnLogicalNand", fnLogicalNand },
{"fnLogicalNor", fnLogicalNor },
......@@ -160,6 +164,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnSign", fnSign },
{"fnSin", fnSin },
{"fnSinc", fnSinc },
{"fnSincpi", fnSincpi },
{"fnSinh", fnSinh },
{"fnSlvq", fnSlvq },
{"fnSquare", fnSquare },
......@@ -894,7 +899,7 @@ void setParameter(char *p) {
void inParameters(char *token) {
char parameter[300];
char parameter[2000];
int32_t index, lg;
strReplace(token, "inf", "9e9999");
......@@ -1075,7 +1080,7 @@ bool_t real34AreEqual(real34_t *a, real34_t *b) {
void checkExpectedOutParameter(char *p) {
char l[200], r[200], real[200], imag[200], angMod[200], letter = 0;
char l[2000], r[2000], real[200], imag[200], angMod[200], letter = 0;
int32_t i, am = AM_DEGREE;
real34_t expectedReal34, expectedImag34;
......@@ -1669,7 +1674,7 @@ void checkExpectedOutParameter(char *p) {
void outParameters(char *token) {
char parameter[300];
char parameter[2000];
int32_t index, lg;
strReplace(token, "inf", "9e9999");
......
......@@ -161,6 +161,7 @@ cos
sin
tan
sinc
sincpi
arccosh
arcsinh
......@@ -221,5 +222,8 @@ deltaPercent
logxy
lnbeta