0% found this document useful (0 votes)
23 views3 pages

Double Double Long Double Long Double: Example For Acos Acos (Arg) Acosl (Arg)

The document discusses several trigonometric functions from the math.h library in C including acos(), atanh(), and erf(). It provides code examples to calculate the arc cosine of values from -1 to 1, which results in outputs from 3.141593 to 0. It also shows an example calling atanh() outside its valid range of -1 to 1 which results in an error. Finally, it demonstrates calculating the error function erf(1.0) which outputs 0.842701.

Uploaded by

pvpraveensundar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

Double Double Long Double Long Double: Example For Acos Acos (Arg) Acosl (Arg)

The document discusses several trigonometric functions from the math.h library in C including acos(), atanh(), and erf(). It provides code examples to calculate the arc cosine of values from -1 to 1, which results in outputs from 3.141593 to 0. It also shows an example calling atanh() outside its valid range of -1 to 1 which results in an error. Finally, it demonstrates calculating the error function erf(1.0) which outputs 0.842701.

Uploaded by

pvpraveensundar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Exampleforacos()

//Declaration:floatacosf(floatarg);
doubleacos(doublearg);
longdoubleacosl(longdoublearg);
//Parameter:Theargumentmustbeintherange1to1.

#include<math.h>
#include<stdio.h>
intmain(void)
{
doubleval=1.0;
do{
printf("Arccosineof%fis%f.\n",val,acos(val));
val+=0.1;
}while(val<=1.0);
return0;
}

/*
Arccosineof1.000000is3.141593.
Arccosineof0.900000is2.690566.
Arccosineof0.800000is2.498092.
Arccosineof0.700000is2.346194.
Arccosineof0.600000is2.214297.
Arccosineof0.500000is2.094395.
Arccosineof0.400000is1.982313.
Arccosineof0.300000is1.875489.
Arccosineof0.200000is1.772154.
Arccosineof0.100000is1.670964.
Arccosineof0.000000is1.570796.
Arccosineof0.100000is1.470629.
Arccosineof0.200000is1.369438.
Arccosineof0.300000is1.266104.
Arccosineof0.400000is1.159279.
Arccosineof0.500000is1.047198.
Arccosineof0.600000is0.927295.
Arccosineof0.700000is0.795399.
Arccosineof0.800000is0.643501.
Arccosineof0.900000is0.451027.
Arccosineof1.000000is0.000000.
*/


//Declaration:floatatanhf(floatarg);
doubleatanh(doublearg);
longdoubleatanhl(longdoublearg);
//Parameter:Thisargumentmustbeintherange1to1.

#include<math.h>
#include<stdio.h>
intmain(void)
{
printf("%f.\n",atanh(12));
return0;
}

/*
1.#IND00.
*/
erf:returnstheerrorfunctionofarg

//Headerfile:#include<math.h>
//Declaration:floaterff(floatarg);
doubleerf(doublearg);
longdoubleerfl(longdoublearg);
#include<math.h>
#include<stdio.h>
intmain(void)
{
printf("Valueofetothefirst:%f.",erf(1.0));

/*
Valueofetothefirst:0.842701.*/
http://www.java2s.com/Code/C/Memory/Memoryset.htm

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html

You might also like