In this blog post, we explore incorrect calculations of the tangent function tan(x) and the cotangent function cot(x) for large numbers in MATLAB.
Example 1. Suppose
x=235556677777.87 .
x=235556677777.87\,.
x=235556677777.87.
Calculate
tan(x)
\tan(x)
tan(x)
and
cot(x)
\cot(x)
cot(x)
in MATLAB.
Let's just post the figure directly.
).
As a result, both outputs from MATLAB contain 11 incorrect digits, with an error rate of 11/16 = 68.75% for the significant figures.
SOCIAL SHARE CARD GENERATOR