Interpolation.LogLog Method

Performs log-log interpolation at a single point.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
public static double LogLog(
	ReadOnlySpan<double> xValues,
	ReadOnlySpan<double> yValues,
	double x
)

Parameters

xValues  ReadOnlySpan<Double>
The x-coordinates of the data points. Must be strictly increasing and positive.
yValues  ReadOnlySpan<Double>
The y-coordinates of the data points. Must be positive.
x  Double
The x-coordinate at which to interpolate. Must be positive.

Return Value

Double
The interpolated y-value in linear units.

Remarks

This method performs logarithmic interpolation in both x and y. Both x-values and y-values must be positive. The result is returned in linear units.

This method throws an exception if x is outside the range of xValues.

Exceptions

ArgumentNullExceptionxValues or yValues is null.
ArgumentExceptionxValues and yValues have different lengths, or contain fewer than 2 elements.
ArgumentOutOfRangeExceptionx is outside the range of xValues, or x is not positive, or any bracketing x-value or y-value is not positive.

See Also