Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the C program, What is the difference between the functions in the math library(math.h) and those defined by yourself? Eg: We can define math.h

In the C program, What is the difference between the functions in the math library(math.h) and those defined by yourself?

Eg:

We can define math.h and use sin(x) cos(x)

Also, we can define sin(x) cos(x) by ourself which ls like

double Sin(double X) { double Result=X,Fac=1.0,Xn=X,Precious=X; int n=1,sign=1; while(Precious>1e-6) { n++; Fac=Fac*n*(++n); Xn*=X*X; sign=-sign; Precious=Xn/Fac; Result=sign>0?Result+Precious:Result-Precious; } return Result; }

So, I noticed the output is exact the same, but if there are some parts still differences between them.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

What is the growth rate of GDP per capita?

Answered: 1 week ago