Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,971 questions

51,913 answers

573 users

How to use asin() function to get the arc sine value of N in C

1 Answer

0 votes
#include <stdio.h>     
#include <math.h>
#include <float.h>
 
int main(int argc, char **argv)
{
    printf("asin(1) = %.6f\n", asin(1));
    printf("asin(0) = %.6f\n", asin(0));
    printf("asin(10) = %.6f\n", asin(10));
    printf("asin(0.5) = %.6f\n", asin(0.5));
    printf("asin(DBL_MAX) = %.6f\n", asin(DBL_MAX));
    printf("asin(INFINITY) = %.6f\n", asin(INFINITY));
 
    return 0;
}
 
// 1.#QNAN0 = Quiet NaNs (qNaNs) do not raise any additional exception
// "NAN" is "not-a-number" - applies to float and double
 
/*
run:
 
asin(1) = 1.570796
asin(0) = 0.000000
asin(10) = -1.#IND00
asin(0.5) = 0.523599
asin(DBL_MAX) = -1.#IND00
asin(INFINITY) = -1.#IND00
 
*/

 



answered Mar 12, 2016 by avibootz
...