exp

Returns e raised to the power of the receiver.

import { Arith } from "@teakit/arith";

Arith.from("0").exp().toString(); // "1"
Arith.from("1").exp().toString(); // "2.71828182845904523536"
Arith.from("-1").exp().toString(); // "0.3678794411714423216"

// Results are rounded by the constructor precision settings.
const Short = Arith.clone({ DECIMAL_PLACES: 8 });
Short.from("1").exp().toString(); // "2.71828183"

// Use the static helper when no method chain is needed.
Arith.exp("-0.1").toString(); // "0.90483741803595957316"

API Reference

Signature

exp(): ArithInstance;

Parameters

ParameterTypeRequiredNotes
None--This method does not take parameters.

Returns

Returns a new Arith instance. The receiver is not modified.

Throws

  • Does not take user arguments; no argument validation is performed.

Agent Contract

FieldValue
Kindinstance method and static helper
Canonical nameexp
AliasesNone
Mutates receiverNo
ReturnsArithInstance
Accepts (string, base) overloadNo
Configuration dependenciesDECIMAL_PLACES, ROUNDING_MODE
Related methodslog

Agent Notes

  • Use exp() as the inverse-style companion to natural log().
  • Do not generate naturalExponential.
  • Use string inputs for exact decimal values.
  • Treat Arith instances as immutable.