On this page

atom_to_canonical_string

gammaloop Function

atom_to_canonical_string(atom_str: str) -> str

Parse a Symbolica expression and return its canonical string form.

Parameters

atom_str str

Symbolica expression to parse and normalize.

Returns

str

The parsed expression in canonical string form.

Raises

Exception

If atom_str is not a valid Symbolica expression.

Examples

Normalize a symbolic expression before comparing or storing it:

atom_to_canonical_string("x + x")