Stream: compiler development

Topic: inf


view this post on Zulip Richard Feldman (Oct 23 2023 at 02:25):

so 1f64 / 0 evaluates to inf : F64 in the repl, and -1f64 / 0 evaluates to -inf : F64

does anyone know where the string inf comes from? I don't see the string literal "inf" in our code base...does it come from zig maybe?

view this post on Zulip Brendan Hansknecht (Oct 23 2023 at 02:29):

yeah, zig

view this post on Zulip Ayaz Hafiz (Oct 23 2023 at 02:29):

yeah i think so https://github.com/zig-lang/zig/blob/b82459fa435c366c6af0fee96c3d9b95c24078f9/lib/std/fmt.zig#L1272-L1274

view this post on Zulip Brendan Hansknecht (Oct 23 2023 at 02:29):

strFromFloatHelp

view this post on Zulip Richard Feldman (Oct 23 2023 at 02:33):

nice, thanks!


Last updated: Jul 06 2025 at 12:14 UTC