hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_machine_sinarg_max (x02ah)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_machine_sinarg_max (x02ah) returns the largest positive argument for which the Fortran intrinsic functions SIN and COS return a result with some meaningful accuracy.

Syntax

[result] = x02ah
[result] = nag_machine_sinarg_max

Description

The trigonometric functions sin and cos supplied in some compiler run-time libraries do not return accurate results when their argument is large. Often the related accuracy of a result gets progressively worse as the argument gets larger. nag_machine_sinarg_max (x02ah) gives a value beyond which the compiler run-time library returns results with no relative accuracy at all. Note that some run-time libraries do return accurate results for all arguments to sin and cos.

References

None.

Parameters

Compulsory Input Parameters

None.

Optional Input Parameters

None.

Output Parameters

1:     result – double scalar
The result of the function.

Error Indicators and Warnings

None.

Accuracy

None.

Further Comments

None.

Example

See Example in nag_machine_precision (x02aj).
function x02ah_example


fprintf('x02ah example results\n\n');

fprintf('largest permissable argument of sin and cos = %16.8e\n', ...
        x02ah);


x02ah example results

largest permissable argument of sin and cos =   1.42724769e+45

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015