/* exp10.c
*
* Base 10 exponential function
* ( Common antilogarithm )
*
*
*
* SYNOPSIS :
*
* int qexp10 ( x , y ) ;
* QELT * x , * y ;
*
* qexp10 ( x , y ) ;
*
*
*
* DESCRIPTION :
*
* Returns 10 raised to the x power .
*
* x x ln 10
* 10 = e
*
*/
/*
Cephes Math Library Release 2 . 2 : January , 1991
Copyright 1984 , 1991 by Stephen L . Moshier
*/
#include "qhead.h"
#if WORDSIZE ==32
#if NQ > 8
static QELT qlog10c[] = {
0 ,EXPONE+1 ,0 ,0 x935d8ddd,0 xaaa8ac16,0 xea56d62b,0 x82d30a28,0 xe28fecf9,
0 xda5df90e,0 x83c61e82,0 x01f02d72,0 x962f02d7,0 xb1a8105c,0 xcc70cbc0
};
QELT qlogt2[] = {
0 ,EXPONE-2 ,0 ,0 x9a209a84,0 xfbcff798,0 x8f8959ac,0 x0b7c9178,0 x26ad30c5,
0 x43d1f349,0 x8a5e6f26,0 xb7cc63cb,0 x286a2d81,0 x919fabd0,0 x9e5cbc73
};
#else
/* 2.30258509299404568401799145468436420760110148862877E+0 */
static short qlog10c[] = {
0000000 ,EXPONE+1 ,0000000 ,0111535 ,0106735 ,0125250 ,
0126026 ,0165126 ,0153053 ,0101323 ,0005050 ,0161220
};
/* 3.010299956639811952137388947244930267681898814621085E-1 */
short qlogt2[] = {
0000000 ,EXPONE-2 ,0000000 ,0115040 ,0115204 ,0175717 ,
0173630 ,0107611 ,0054654 ,0005574 ,0110570 ,0023255 };
#endif
#else
/* word size is 16 */
#if NQ > 12
static QELT qlog10c[] = {
0 x0000,EXPONE+1 ,0 x0000,0 x935d,0 x8ddd,0 xaaa8,0 xac16,0 xea56,
0 xd62b,0 x82d3,0 x0a28,0 xe28f,0 xecf9,0 xda5d,0 xf90e,0 x83c6,
0 x1e82,0 x01f0,0 x2d72,0 x962f,0 x02d7,0 xb1a8,0 x105c,0 xcc71
};
QELT qlogt2[] = {
0 x0000,EXPONE-2 ,0 x0000,0 x9a20,0 x9a84,0 xfbcf,0 xf798,0 x8f89,
0 x59ac,0 x0b7c,0 x9178,0 x26ad,0 x30c5,0 x43d1,0 xf349,0 x8a5e,
0 x6f26,0 xb7cc,0 x63cb,0 x286a,0 x2d81,0 x919f,0 xabd0,0 x9e5d
};
#else
/* 2.30258509299404568401799145468436420760110148862877E+0 */
static QELT qlog10c[] = {
0000000 ,EXPONE+1 ,0000000 ,0111535 ,0106735 ,0125250 ,
0126026 ,0165126 ,0153053 ,0101323 ,0005050 ,0161220
};
/* 3.010299956639811952137388947244930267681898814621085E-1 */
QELT qlogt2[] = {
0000000 ,EXPONE-2 ,0000000 ,0115040 ,0115204 ,0175717 ,
0173630 ,0107611 ,0054654 ,0005574 ,0110570 ,0023255 };
#endif
#endif
extern QELT qlogt2[];
int qtanh();
int qexp10( x, y )
QELT x[], y[];
{
QELT a[NQ];
qmul( x, qlog10c, a );
qexp( a, y );
return 0 ;
}
/* qexp11.c
*
* 10 * * x - 1 for small x .
*
* 1 + tanh x / 2
* exp ( x ) = - - - - - - - - - - - -
* 1 - tanh x / 2
*
*
* 2 tanh x / 2
* exp ( x ) - 1 = - - - - - - - - - - - -
* 1 - tanh x / 2
*
* exp10 ( x ) = exp ( x log 10 )
*
*/
extern QELT qone[];
int qexp11( xx, y )
QELT xx[], y[];
{
QELT num[NQ], den[NQ], x[NQ];
if ( xx[1 ] == 0 )
{
qclear(y);
return 0 ;
}
qmul( xx, qlog10c, x ); /* x * log(10) */
x[1 ] -= 1 ; /* x/2 */
qtanh( x, num ); /* tanh( x/2 ) */
qsub( num, qone, den ); /* 1 - tanh */
num[1 ] += 1 ;
qdiv( den, num, y ); /* (2 * tanh)/(1 - tanh) */
return 0 ;
}
Messung V0.5 in Prozent C=91 H=100 G=95
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-23)
¤
*© Formatika GbR, Deutschland