Skip to content

Happy new year!

Compare
Choose a tag to compare
@trizen trizen released this 02 Jan 10:52
· 2887 commits to master since this release

Version 2.20

New year, new approaches, new experiments!

I'm very happy to announce today the release of Sidef 2.20, which includes a very important change in the core of the language, namely the transition from Math::Big{Float,Int,Rat} to Math::{MPFR,MPC,GMPz,GMPq}, which makes Sidef about 6x faster and much more reliable for numerical computations.

Happy new year!

What's new

  • Switched from Math::Big{Float,Int,Rat} to Math::{MPFR,MPC,GMPz,GMPq} (445a699)
  • Added support for initialization of numbers in different bases (from 2 to 36) (dec506c)
  • Complex numbers and real numbers are now blended together (1a507bb)
  • Added the Inf and -Inf keywords to represent positive and negative infinity
  • Added the NaN keyword to represent the Not a Number value (be1542b)
  • New methods inside the Number class, such as: fib, gamma, is_prime, primorial, etc...
  • Added the with(expr){...} statement, similar to that from Perl 6 (bd8c1da)
  • Added support for Unicode symbols in Math constants, such as Math::π (d67be5d)
  • Added the Number.base(n) method to return a number in a given base (33df118)
  • Added a new syntax for changing or declaring class variables (Class!name) (a86d4cb)

Improvements

  • Better support for Complex numbers (b6ed0b9 0c85c73)
  • Extended the support for ranges with floating-point numbers (2faee2a)
  • Better stringification of numbers (e.g.: (100! + 1) / 2 will display the exact result) (a86d4cb)

Changes

  • Removed the Byte(s), Char(s) and Graph(s) built-in types (445a699)
  • Changed the behavior of // operator to mean integer division (d4199ad)
  • Redefined the behavior for Inf**0 to return 1, instead of NaN (b9fc23f)

Bug-fixes

  • Fixed the String.count(regex) method to return correctly the number of matches (8affc32)

More changes: 2.13...2.20