Added test07

This commit is contained in:
rajdakin 2018-12-27 19:46:03 +01:00
parent 23b48b68cc
commit bb9b5d8dc8
3 changed files with 21 additions and 0 deletions

1
tests/ref07.txt Normal file
View File

@ -0,0 +1 @@
0 is 0.000000, sin(pi/2) is 1.000000 and 3*1.5 is 4.500000.

BIN
tests/test07 Executable file

Binary file not shown.

20
tests/test07.c Normal file
View File

@ -0,0 +1,20 @@
#include <math.h>
#include <stdio.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
int main(int argc, char **argv)
{
long double zero = 0.0;
double si = sin(M_PI / 2.0);
int a = 3;
float b = 1.5;
float mul = a * b;
printf("0 is %Lf, sin(pi/2) is %f and 3*1.5 is %f.\n", zero, si, mul);
return 0;
}