Skip to content

Min integer value gets parsed as a float #2284

@Dav1com

Description

@Dav1com

Description

According to the Typst documentation https://typst.app/docs/reference/foundations/int/ the smallest integer is -9223372036854775808 but when using the literal for that number it gets parsed as a float instead of an integer. The value can still be obtained through arithmetic:

#let literal_min_int = -9223372036854775808  // parsed as float
#let real_min_int = -9223372036854775807 - 1

#type(literal_min_int) // float

#type(real_min_int) // integer

Reproduction URL

https://typst.app/project/rb52J82NefdZ4oTOE3ODK_

Operating system

Web app, Linux

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentationgood first issueGood for newcomersscriptingAbout Typst's coding capabilitiessyntaxAbout syntax, parsing, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions