{"record":{"id":"bfdba1d9a7f19505","repo":"typst/typst","slug":"integer-value-is-too-small","errorCode":null,"errorMessage":"integer value is too small","messagePattern":"integer value is too small","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/typst-eval/src/ops.rs","lineNumber":148,"sourceCode":"                hint: \"2^63 does not fit into a signed 64-bit integer\";\n                hint: \"try writing `int.min`\";\n            );\n        } else {\n            let mut error = error!(\n                unary.span(),\n                \"integer value is too small\";\n                hint: \"value does not fit into a signed 64-bit integer\";\n            );\n            if base.is_none() {\n                error.hint(\n                    \"a floating point number could approximately represent this value\",\n                );\n                error.hint(eco_format!(\n                    \"you can use a floating point number by appending a dot: `{}.`\",\n                    expr.to_untyped().leaf_text()\n                ));\n            }\n            bail!(error);\n        }\n    }\n    Ok(())\n}\n","sourceCodeStart":130,"sourceCodeEnd":153,"githubUrl":"https://github.com/typst/typst/blob/35417aa769ab9d699a60384f91082b09bc6ba421/crates/typst-eval/src/ops.rs#L130-L153","documentation":"From overflowing_int_negation_error in the evaluator: an integer literal's positive value exceeds the signed 64-bit range when negated (a too-negative number), and the parser rejects it outright; the hints suggest a float or float-based representation that can approximately hold the magnitude.","triggerScenarios":"Thrown at crates/typst-eval/src/ops.rs:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a floating point literal (e.g. `1e19`) for values beyond ±2^63","Use `float(...)` conversions for large magnitude arithmetic","Reconsider whether such large magnitudes are needed at all"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35417aa769ab9d699a60384f91082b09bc6ba421","analyzedAt":"2026-08-17T21:03:48.984Z","contentChangedAt":"2026-08-17T21:03:48.984Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}