Connection
Base URL, credentials and a reachable server.
DecibelSpruce helps examine amplitude comparisons in the logarithmic domain, where separate logarithms avoid forming an extreme intermediate ratio.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
from math import log10
def amplitude_db(amplitude, reference):
if any(type(v) not in (int, float) or not 1e-300 <= v <= 1e300
for v in (amplitude, reference)):
raise ValueError("amplitude.range")
return 20 * (log10(amplitude) - log10(reference))