summaryrefslogtreecommitdiff
path: root/mcon/U/d_dbl_dig.U
blob: f2400882a173d28ee656e9761496492bbc303a99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
?RCS: $Id: d_dbl_dig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS: 
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
?RCS:
?RCS: $Log: d_dbl_dig.U,v $
?RCS: Revision 3.0.1.1  1994/08/29  16:07:28  ram
?RCS: patch32: created by ADO
?RCS:
?MAKE:d_dbl_dig: Myread contains cat rm Setvar i_limits i_float \
	cppstdin cppflags cppminus
?MAKE:	-pick add $@ %<
?S:d_dbl_dig:
?S:	This variable conditionally defines d_dbl_dig if this system's
?S:	header files provide DBL_DIG, which is the number of significant
?S:	digits in a double precision number.
?S:.
?C:HAS_DBL_DIG:
?C:	This symbol, if defined, indicates that this system's <float.h>
?C:	or <limits.h> defines the symbol DBL_DIG, which is the number
?C:	of significant digits in a double precision number.  If this
?C:	symbol is not defined, a guess of 15 is usually pretty good.
?C:.
?H:#$d_dbl_dig HAS_DBL_DIG 	/**/
?H:.
?F:!dbl_dig.c
?LINT:set d_dbl_dig
: See if number of significant digits in a double precision number is known
echo " "
$cat >dbl_dig.c <<EOM
#$i_limits I_LIMITS
#$i_float I_FLOAT
#ifdef I_LIMITS
#include <limits.h>
#endif
#ifdef I_FLOAT
#include <float.h>
#endif
#ifdef DBL_DIG
printf("Contains DBL_DIG");
#endif
EOM
$cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
	echo "DBL_DIG found." >&4
	val="$define"
else
	echo "DBL_DIG NOT found." >&4
	val="$undef"
fi
$rm -f dbl_dig.?
set d_dbl_dig
eval $setvar