xref: /openbsd-src/regress/lib/libm/cephes/constll.c (revision 8c561d56fadcee3395c3eec8f12a7cbb1c76df5e)
1*8c561d56Smartynas /*	$OpenBSD: constll.c,v 1.1 2011/06/02 21:47:40 martynas Exp $	*/
2*8c561d56Smartynas 
3*8c561d56Smartynas /*
4*8c561d56Smartynas  * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net>
5*8c561d56Smartynas  *
6*8c561d56Smartynas  * Permission to use, copy, modify, and distribute this software for any
7*8c561d56Smartynas  * purpose with or without fee is hereby granted, provided that the above
8*8c561d56Smartynas  * copyright notice and this permission notice appear in all copies.
9*8c561d56Smartynas  *
10*8c561d56Smartynas  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11*8c561d56Smartynas  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12*8c561d56Smartynas  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13*8c561d56Smartynas  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14*8c561d56Smartynas  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15*8c561d56Smartynas  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16*8c561d56Smartynas  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*8c561d56Smartynas  */
18*8c561d56Smartynas 
19*8c561d56Smartynas #include <float.h>
20*8c561d56Smartynas 
21*8c561d56Smartynas #if	LDBL_MANT_DIG == 113
22*8c561d56Smartynas 
23*8c561d56Smartynas /* (1 - 2^-113) 2^16384 */
24*8c561d56Smartynas long double MAXNUML = 1.189731495357231765085759326628007016196469e4932L;
25*8c561d56Smartynas 
26*8c561d56Smartynas /* 2^-113 */
27*8c561d56Smartynas long double MACHEPL = 9.629649721936179265279889712924636592690508e-35L;
28*8c561d56Smartynas 
29*8c561d56Smartynas /* (1 + 2^-112) 2^-16382 */
30*8c561d56Smartynas long double UFTHRESHL = 3.362103143112093506262677817321753250115591e-4932L;
31*8c561d56Smartynas 
32*8c561d56Smartynas /* 2^-16494 */
33*8c561d56Smartynas long double MINNUML = 6.475175119438025110924438958227646552499569e-4966L;
34*8c561d56Smartynas 
35*8c561d56Smartynas /* ln(MAXNUM) */
36*8c561d56Smartynas long double MAXLOGL = 1.1356523406294143949491931077970764891253E4L;
37*8c561d56Smartynas 
38*8c561d56Smartynas /* ln(MINNUM) */
39*8c561d56Smartynas long double MINLOGL = -1.143276959615573793352782661133116431383730e4L;
40*8c561d56Smartynas 
41*8c561d56Smartynas /* ln(UFTHRESH) */
42*8c561d56Smartynas /* long double MINLOGL = -1.135513711193302405887309661372784853802025e4L; */
43*8c561d56Smartynas 
44*8c561d56Smartynas long double PIL = 3.141592653589793238462643383279502884197169L;
45*8c561d56Smartynas 
46*8c561d56Smartynas long double PIO2L = 1.570796326794896619231321691639751442098585L;
47*8c561d56Smartynas 
48*8c561d56Smartynas long double PIO4L =  0.7853981633974483096156608458198757210492923L;
49*8c561d56Smartynas 
50*8c561d56Smartynas long double LOGE2L =  0.6931471805599453094172321214581765680755001L;
51*8c561d56Smartynas 
52*8c561d56Smartynas long double LOG2EL =  1.442695040888963407359924681001892137426646L;
53*8c561d56Smartynas 
54*8c561d56Smartynas long double INFINITYL = 1.0L / 0.0L;
55*8c561d56Smartynas 
56*8c561d56Smartynas #endif	/* LDBL_MANT_DIG == 113 */
57