source: tests/math3.c @ 5c45fec

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 5c45fec was 73abe95, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Replace extension-less headers with .hfa

  • Property mode set to 100644
File size: 2.0 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// math3.c --
8//
9// Author           : Peter A. Buhr
10// Created On       : Fri Apr 22 14:59:21 2016
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Thu May 24 21:06:12 2018
13// Update Count     : 82
14//
15
16#include <fstream.hfa>
17#include <math.hfa>
18
19int main( void ) {
20        float f;
21        double d;
22        long double l;
23
24        //---------------------- Hyperbolic ----------------------
25
26        sout | "sinh:" | sinh( 1.0F ) | sinh( 1.0D ) | sinh( 1.0L ) | sinh( 1.0F+1.0FI ) | sinh( 1.0D+1.0DI ) | sinh( 1.0DL+1.0LI ) | endl;
27        sout | "cosh:" | cosh( 1.0F ) | cosh( 1.0D ) | cosh( 1.0L ) | cosh( 1.0F+1.0FI ) | cosh( 1.0D+1.0DI ) | cosh( 1.0DL+1.0LI ) | endl;
28        sout | "tanh:" | tanh( 1.0F ) | tanh( 1.0D ) | tanh( 1.0L ) | tanh( 1.0F+1.0FI ) | tanh( 1.0D+1.0DI ) | tanh( 1.0DL+1.0LI ) | endl;
29        sout | "acosh:" | acosh( 1.0F ) | acosh( 1.0D ) | acosh( 1.0L ) | acosh( 1.0F+1.0FI ) | acosh( 1.0D+1.0DI ) | acosh( 1.0DL+1.0LI ) | endl;
30        sout | "asinh:" | asinh( 1.0F ) | asinh( 1.0D ) | asinh( 1.0L ) | asinh( 1.0F+1.0FI ) | asinh( 1.0D+1.0DI ) | asinh( 1.0DL+1.0LI ) | endl;
31        sout | "atanh:" | atanh( 1.0F ) | atanh( 1.0D ) | atanh( 1.0L ) | atanh( 1.0F+1.0FI ) | atanh( 1.0D+1.0DI ) | atanh( 1.0DL+1.0LI ) | endl;
32
33        //---------------------- Error / Gamma ----------------------
34
35        sout | "erf:" | erf( 1.0F ) | erf( 1.0D ) | erf( 1.0L ) | endl;
36        sout | "erfc:" | erfc( 1.0F ) | erfc( 1.0D ) | erfc( 1.0L ) | endl;
37        sout | "lgamma:" | lgamma( 4.0F ) | lgamma( 4.0D ) | lgamma( 4.0L ) | endl;
38        int sign;
39        f = lgamma( 4.0F, &sign );
40        sout | "lgamma:" | f | sign;
41        d = lgamma( 4.0D, &sign );
42        sout | d | sign;
43        l = lgamma( 4.0L, &sign );
44        sout | l | sign | endl;
45        sout | "tgamma:" | tgamma( 4.0F ) | tgamma( 4.0D ) | tgamma( 4.0L ) | endl;
46} // main
47
48// Local Variables: //
49// tab-width: 4 //
50// compile-command: "cfa math3.c" //
51// End: //
Note: See TracBrowser for help on using the repository browser.