Agena is an easy-to-learn procedural programming language suited to be used in scientific, educational, linguistic, and many other applications, including scripting.
What’s new in version 6.4.1
New Features
New `ints.leadzeros` counts the number of leading zeros (clz) in an unsigned 64-bit integer.
New `ints.leastsigbit` returns the position of the least significant bit (lsb) in an unsigned 64-bit integer, that is the smallest index of the first 1-bit.
New `ints.mostsigbit` returns the position of the most significant bit (msb) in an unsigned 64-bit integer, i.e. the largest index of a 1-bit.
New `ints.onebits` counts the number of 1-bits in an unsigned 64-bit integer.
New `ints.trailzeros` counts the number of trailing zeros (ctz) in an unsigned 64-bit integer.
New `ints.tobytes` returns all the bytes of a 64-bit integer in a sequence.
Added the constants `ints.naught` and `ints.nought` for unsigned 64-bit zero, `ints.one` for unsigned 1, `ints.two` and `ints.ten` for unsigned 2, 10.
Improvements and Fixes
Added safeguards to `ints` package 64-bit integer rotation operators `<<<` and `>>>` to prevent undefined behaviour if the shift is 64 or more.
If given a hexadecimal string, `ints.int64` and `ints.uint64` now reliably check for overflow and issue an error.
With 64-bit integers, the `abs`, `^` and `**` operators may have crashed Agena on some platforms. This has been fixed.
Corrected error messages of `ints.uint64`.
`bytes.leastsigbit` could have shown unexpected behaviour on some platforms when given zero as the input. This has been fixed.
`bytes.reverse` produced trash and has been fixed.
In Solaris, AgenaEdit and the `mapm` and `ival` packages theoretically may not have worked properly. This has been fixed.