Commit Graph

11 Commits (54987c3d8f358e4ded9113a9ee5fa04dc1372a56)

Author SHA1 Message Date
Marc Tiehuis e5175d432e Fix release float printing errors
Fixes #564.
Fixes #669.
Fixes #928.
2018-04-23 17:22:51 +12:00
Marc Tiehuis d8ba1bc120 Improve fmt float-printing
- Fix errors printing very small numbers
 - Add explicit scientific output mode
 - Add rounding based on a specific precision for both decimal/exp
 modes.
 - Test and confirm exp/decimal against libc for all f32 values. Various
 changes to better match libc.
2018-04-23 17:22:51 +12:00
Andrew Kelley 3671582c15 syntax: functions require return type. remove `->`
The purpose of this is:

 * Only one way to do things
 * Changing a function with void return type to return a possible
   error becomes a 1 character change, subtly encouraging
   people to use errors.

See #632

Here are some imperfect sed commands for performing this update:

remove arrow:

```
sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig")
```

add void:

```
sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig")
```

Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-25 04:10:11 -05:00
Andrew Kelley 4183c6f1a5 move std/debug.zig to a subdirectory
self hosted compiler parser tests do some fuzz testing
2017-12-23 22:15:48 -05:00
Andrew Kelley d917815d81 explicitly return from blocks
instead of last statement being expression value

closes #629
2017-12-22 00:50:30 -05:00
scurest 262b7428cf More corrections to float printing
Testing suggests all f32s are now printed accurately.
2017-10-24 14:18:50 -05:00
scurest 03a0dfbeca Print better floats 2017-10-23 15:40:49 -05:00
Andrew Kelley c73a0c92d0 fix floating point printing 2017-08-19 19:11:43 -04:00
Andrew Kelley f78ee53484 fix printing floating point compile errors
now we just need compiler_rt implementations for:

 undefined symbol '__fixunsdfti'
 undefined symbol '__umodti3'
 undefined symbol '__udivti3'
2017-08-07 18:11:24 -04:00
Andrew Kelley 2234788fa8 add ability to explicitly cast float to integer
closes #414
2017-08-07 15:57:41 -04:00
Andrew Kelley 7f0620a20f partial implementation of printing floating point numbers with errol3
also add bitCast builtin function. closes #387
2017-06-14 00:24:25 -04:00