File:  [Research Unix] / researchv10no / cmd / lcc / ph / real8.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/* The Plum Hall Validation Suite for C
 * Unpublished copyright (c) 1986-1991, Chiron Systems Inc and Plum Hall Inc.
 * VERSION: 4
 * DATE: 1993-01-01
 * The "ANSI" mode of the Suite corresponds to the official ANSI C, X3.159-1989.
 * As per your license agreement, your distribution is not to be moved or copied outside the Designated Site
 * without specific permission from Plum Hall Inc.
 */

/****************************************************************************
 ** Self-checking C source code generated by EGEN component of             **
 **    The Plum Hall Validation Suite for C.                               **
 **    (C) 1986-1988 Chiron Systems Inc and Plum Hall Inc                  **
 **    EGEN Version 1.09.000  88/08/21                                     **
 **                                                                        **
 **    EGEN -P -R8 -V -A -N5 -Dreal.gen ( @ @ ) @ ( @ @ )                  **
 ****************************************************************************/
#include  "defs.h"


int main()
	{
	extern char *Filename;
	auto float f1;
	auto float * pf1;
	auto float f2;
	auto float * pf2;
	auto float f3;
	auto float * pf3;
	auto float f4;
	auto float * pf4;
	auto double d1;
	auto double * pd1;
	auto double d2;
	auto double * pd2;
	auto double d3;
	auto double * pd3;
	auto double d4;
	auto double * pd4;
	auto double d5;
	auto double * pd5;
	auto double d6;
	auto double * pd6;

	f1 = fvalue(1.000000E+000);
	pf1 = &f1;
	f2 = fvalue(2.000000E+000);
	pf2 = &f2;
	f3 = fvalue(3.000000E+000);
	pf3 = &f3;
	f4 = fvalue(4.000000E+000);
	pf4 = &f4;
	d1 = dvalue(1.000000000000000E+000);
	pd1 = &d1;
	d2 = dvalue(2.000000000000000E+000);
	pd2 = &d2;
	d3 = dvalue(3.000000000000000E+000);
	pd3 = &d3;
	d4 = dvalue(4.000000000000000E+000);
	pd4 = &d4;
	d5 = dvalue(5.000000000000000E+000);
	pd5 = &d5;
	d6 = dvalue(6.000000000000000E+000);
	pd6 = &d6;
	Filename = "real8.c";

	/* 1.00000000000000E+000 * 1.00000000000000E+000 => 1.00000000000000E+000 */
	/* 1.00000000000000E+000 + 5.00000000000000E+000 => 6.00000000000000E+000 */
	/* 6.00000000000000E+000 /= 3.00000E+000 => 2.00000000000000E+000 */
	/* 4.00000E+000 += 2.00000E+000 => 6.00000E+000 */
	/* 6.00000E+000 - 6.00000E+000 => 0.00000E+000 */
	fequals(__LINE__, (((d1 * d1) + *pd5) - (f4 += (d6 /= *pf3))), 0.00000E+000);
	fequals(__LINE__, d6, 2.00000E+000);
	fequals(__LINE__, f4, 6.00000E+000);

	/* pre-- 2.00000000000000E+000 => 1.00000000000000E+000 */
	/* 5.00000000000000E+000 == 1.00000000000000E+000 => 0 */
	/* 2.00000E+000 * 1.00000000000000E+000 => 2.00000000000000E+000 */
	/* 2.00000000000000E+000 < 1.00000000000000E+000 => 0 */
	/* 0 - 0 => 0 */
	iequals(__LINE__, ((d5 == ( -- d6)) - ((f2 * d1) < d1)), 0);
	dequals(__LINE__, d6, 1.00000000000000E+000);

	/* neg 5.00000000000000E+000 => -5.00000000000000E+000 */
	/* -5.00000000000000E+000 - 5.00000000000000E+000 => -1.00000000000000E+001 */
	/* 5.00000000000000E+000 < 3.00000E+000 => 0 */
	/* 0 >= 1.00000E+000 => 0 */
	/* -1.00000000000000E+001 == 0 => 0 */
	iequals(__LINE__, ((( - d5) - d5) == ((*pd5 < f3) >= *pf1)), 0);

	/* post-- 1.00000000000000E+000 => 2.00000000000000E+000 */
	/* 1.00000E+000 + 2.00000000000000E+000 => 3.00000000000000E+000 */
	/* pre-- 3.00000E+000 => 2.00000E+000 */
	/* 2.00000E+000 && 2.00000E+000 => 1 */
	/* 3.00000E+000 < 1 => 0 */
	iequals(__LINE__, ((f1 + ((*pd2)-- )) < (( -- *pf3) && f2)), 0);
	fequals(__LINE__, f3, 2.00000E+000);
	fequals(__LINE__, d2, 1.00000E+000);

	/* post++ 3.00000E+000 => 2.00000E+000 */
	/* 2.00000E+000 + 6.00000E+000 => 8.00000E+000 */
	/* ! 1.00000E+000 => 0 */
	/* 0 || 2.00000E+000 => 1 */
	/* 8.00000E+000 && 1 => 1 */
	iequals(__LINE__, ((((*pf2)++ ) + f4) && (( ! *pf1) || *pf3)), 1);
	fequals(__LINE__, f2, 3.00000E+000);

	return 	report(Filename);
	}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.