Project

EarthSciAST

The EarthSciML Abstract Syntax Tree format: schema, operators, coupling, and five language bindings.

Contents

precision_source

Stable function · Other

Tier: stable · Kind: function · Topic: Other

JuliaTypeScriptPythonRustGo
precision_sourceprecisionSourceprecision_sourceprecision_sourcePrecisionSource

Julia

precision_source(document::EsmFile)
precision_source(document::EsmFile, variable::Union{Nothing, ModelVariable})
precision_source(document::EsmFile, [variable])

Return the declared element type or "unspecified" (esm-spec §11.3.3). Omit the variable to query the document default, including for reaction species and parameters.

Source

TypeScript

function precisionSource(document: EsmFile, variable?: Pick<ModelVariable, 'element_type'>): 'Float32' | 'Float64' | 'unspecified'

Return the declared element type or unspecified. With no variable, query the document default.

Source

Python

precision_source(document: EsmFile, variable: ModelVariable | None = None) -> str

Return the declared element type, or unspecified for eligible omission.

Pass no variable to query the document default (also used by species and reaction-system parameters).

Source

Rust

pub fn precision_source(document: &EsmFile, variable: Option<&ModelVariable>) -> Result<PrecisionSource, CompileError>

Return the source of a variable’s working precision (esm-spec §11.3.3). Pass None for the document default, including reaction species and parameters.

Source · Rust docs

Go

func PrecisionSource(document *ESMFile, variable *ModelVariable) string

PrecisionSource returns the declared element type or “unspecified” (§11.3.3). A nil variable queries the document default, including for reaction species and parameters.

Source · Go docs