Commit Graph

18 Commits (54675b060ae6139f60e111521b9a2688f66977a0)

Author SHA1 Message Date
Marc Tiehuis 0705b711f8 Correct floating-point literal allowed ranges
The exponent range for floating-point values is [-1022, 1023].

Fixes #399.
2017-08-07 18:08:09 +12:00
Andrew Kelley d1e68c3ca8 better bigint/bigfloat implementation 2017-07-08 17:59:10 -04:00
Andrew Kelley 68add5d828 clean up behavior test names 2017-05-23 21:38:31 -04:00
Andrew Kelley 29beb603b7 allow division and remainder operators sometimes
when the values are comptime known and the result would be the same,
allow `/` and `%` for signed integers and floats.

closes #365
2017-05-06 23:59:57 -04:00
Andrew Kelley 157af4332a builtin functions for division and remainder division
* add `@divTrunc` and `@divFloor` functions
 * add `@rem` and `@mod` functions
 * add compile error for `/` and `%` with signed integers
 * add `.bit_count` for float primitive types

closes #217
2017-05-06 23:13:12 -04:00
Andrew Kelley 407916cd2f rename `@intType` to `@IntType` to follow convention
closes #327
2017-04-18 00:05:09 -04:00
Andrew Kelley 7ce753a16b replace "&&" and "||" with "and" and "or"
closes #272
2017-03-26 05:21:28 -04:00
Andrew Kelley af536ac343 introduce new test syntax
* remove setFnTest builtin
 * add test "name" { ... } syntax
 * remove --check-unused argument. functions are always lazy now.
2017-03-16 16:02:35 -04:00
Andrew Kelley 8dd0b4e1f1 add passing test for floating point edge case 2017-02-26 16:30:15 -05:00
Andrew Kelley b6e7a0dadd support arithmetic for non byte aligned integer types
see #261
2017-02-16 17:08:55 -05:00
Andrew Kelley e5b1758010 remove staticEval builtin in favor of comptime expression 2017-01-22 23:21:00 -05:00
Andrew Kelley 6caf32195a pass unnecessary if statement test 2017-01-08 22:25:38 -05:00
Andrew Kelley 3b5e26b7f7 self hosted tests import std library 2017-01-05 03:57:48 -05:00
Andrew Kelley 6ec6589bd8 IR: pass MT19937_64 test 2017-01-05 00:59:37 -05:00
Andrew Kelley 69132bdeda IR: progress toward compiling standard library
* comptime fn call
 * is_comptime doesn't count as an instruction dependency
 * update more std code to latest zig
2016-12-31 17:10:29 -05:00
Andrew Kelley 5f89393acb IR: implement binary not instruction 2016-12-31 02:23:39 -05:00
Andrew Kelley aee7ad3de2 IR: port all passing tests over 2016-12-26 03:44:59 -05:00
Andrew Kelley 6c9ec3688e IR testing: rename cases3 dir to cases 2016-12-26 02:49:30 -05:00