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)

## 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 $\mathrm{sin}$ and $\mathrm{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 $\mathrm{sin}$ and $\mathrm{cos}$.

None.

## Parameters

None.

None.

### Output Parameters

1:     $\mathrm{result}$ – double scalar
The result of the function.

None.

None.

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