Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/langref.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,10 @@
otherwise the optimizer figures out all the values at compile-time,
which operates in strict mode.</p>
{#code|float_mode_exe.zig#}
{#shell_samp#}$ zig build-exe float_mode_exe.zig -O ReleaseFast
$ ./float_mode_exe
optimized = 0.001
strict = 0.0009765625{#end_shell_samp#}

{#see_also|@setFloatMode|Division by Zero#}
{#header_close#}
Expand Down
4 changes: 4 additions & 0 deletions doc/langref/float_mode_exe.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ pub fn main() void {
}

// syntax
// This file requires the object file of float_mode_obj.zig
// Currently the automatic generation of the langref runs each file independently
// and does therefore not support this use case
// The output for this snippet is written into the langref manually as a workaround