MPI Taylor series tan(x) function

Since tan(x) = sine(x)/cosine(x), we could combine the Taylor series formula of the sine(x) and cos(x) to construct the tangent function as follows:

MPI Taylor series tan(x) function

Write, compile, and run this Serial tangent(x) code (see the following serial  tangent(x) code) to get a feel of the program:

/********************************** * Serial tangent(x) code. * * * * Taylor series representation * * of the trigonometric tan(x). * * * * Author: Carlos R. Morrison * * * * Date: 1/10/2017 * **********************************/ #include <math.h> #include <stdio.h> int main(void) { /************************************************/ unsigned int ...

Get Build Supercomputers with Raspberry Pi 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.