Expand description
Limit evaluation for mathematical expressions.
This module provides functions for computing limits of expressions as a variable approaches a specific value.
§Overview
The limit module supports:
- Direct substitution for continuous functions
- Detection of indeterminate forms (0/0, ∞/∞, etc.)
- Limits at infinity
- One-sided limits (left and right)
- Common special limits (sin(x)/x, etc.)
§Examples
§Direct Substitution
use thales::limits::{limit, LimitPoint};
use thales::parser::parse_expression;
// lim_{x->2} x^2 = 4
let expr = parse_expression("x^2").unwrap();
let result = limit(&expr, "x", LimitPoint::Value(2.0));
// Returns Ok with value 4.0§Limit at Infinity
use thales::limits::{limit, LimitPoint};
use thales::parser::parse_expression;
// lim_{x->∞} 1/x = 0
let expr = parse_expression("1/x").unwrap();
let result = limit(&expr, "x", LimitPoint::PositiveInfinity);Enums§
- Indeterminate
Form - Types of indeterminate forms.
- Limit
Error - Error type for limit evaluation failures.
- Limit
Point - The point that a limit approaches.
- Limit
Result - Result of a limit evaluation.
Functions§
- limit
- Evaluate the limit of an expression.
- limit_
left - Evaluate limit from the left (approaching from below).
- limit_
right - Evaluate limit from the right (approaching from above).
- limit_
with_ lhopital - Evaluate the limit using L’Hôpital’s rule when needed.