precision_source
Stable function · Other
Tier: stable · Kind: function · Topic: Other
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
precision_source | precisionSource | precision_source | precision_source | PrecisionSource |
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.
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.
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).
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.