Skip to content

Numerical tower #34

@jcubic

Description

@jcubic

TODO:

  • Complex Type
    • Complex-Float
    • Complex Integer
    • Complex Rational
      • (make-rectangular 1/2 2/4)
      • (/ 10+10i 10+2i) works in Kawa (Lips convert to Float)
      • Complex NaN e.g. +nan.0+5.0i
      • Complex Infinite e.g. 3.0+inf.0i
    • Mixed complex 1/2+0.1i (all combinations)
    • Rational Complex literal
      • inexact #i1/2+2/4i -> (exact->inexact 1/2+2/4i).
    • big num complex 10e+10i.
  • Float Type
  • Rational
  • BigInteger
  • Number literals
  • hex octal and binary and decimal literals (#b #o #x #d)
    • binary/hex/octal with complex and rational #b1/100 #b100+100i
  • big literal numbers in scientific notation should parse as big int
  • #e #i exact inexact literals that do conversion
    • #b#x #x#b replace in tokenizer (1/4 == 0.25)
    • #i#b1/100 inexact rational binary
    • big exact fractions #e1e-1000 or #e1.2e-1000
  • +nan.0 and -nan.0 return by parser
  • proper negative 0
  • Case insensitive mnemonics
  • string->number should parse all tokens #[ieoxb]
  • proper casting and all combination of operations
  • properly working string->number
  • Unit tests for operations (all types)
    • sqrt
    • abs
      • nan
      • inf
    • /
      • nan
      • inf
    • number->string (check if they are ok)
    • string->number
    • +
      • nan
      • inf
    • -
      • nan
      • inf
    • *
      • nan
      • inf
    • modulo integer integer (test types)
    • quotient integer integer (test types)
    • reminder int int (test types)
    • max
    • min
    • gcd integer ...
    • lcm integer ...
    • exp
    • expt
    • log
    • trigonometry
      • sin
      • cos
      • tan
      • asin
      • acos
      • atan
    • round, truncate, floor, ceiling
    • positive? / negative?
    • exact->inexact
    • inexact->exact
    • comparisons < > <= >= =
      • nan
      • inf

Bugs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions