Function Entry: ATAN

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: ATAN

Name

atan

Class

Function

Syntax

(atan num1 [num2])

Arguments and Values

  • num1: integer or real.
  • num2 (optional): integer or real.

Description

Returns the arctangent in radians. With one argument, returns the arctangent of num1. With two arguments, returns the arctangent of num1/num2 and uses the signs of both arguments to choose the correct quadrant. If num2 is zero, the result is +π/2 or -π/2 depending on the sign of num1.

Return Values

A real number in the range [-π/2, +π/2] for the one-argument form, and in (-π, +π] for the two-argument form.

Side Effects

None.

Examples

  • (atan 1) returns 0.785398.
  • (atan 0.5) returns 0.463648.
  • (atan -1.0) returns -0.785398.
  • (atan 2.0 3.0) returns 0.588003.
  • (atan 2.0 -3.0) returns 2.55359.
  • (atan 1.0 0.0) returns 1.5708.

Availability

  • AutoCAD 2026: documented.
  • BricsCAD V26: presumed compatible.
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.