typelevel / spire

Powerful new number types and numeric abstractions for Scala.
http://typelevel.org/spire/
MIT License
1.76k stars 243 forks source link

What is exactly `Jet`? #598

Open denisrosset opened 7 years ago

denisrosset commented 7 years ago

The status of Jet is unclear. There are conflicting indications that:

  1. Jet is intended to be a substitute of a real number in computations, so that derivatives can be automatically recovered at the end. Thus Jet has Field, Order instances ... even if those instances are not lawful. In that case, the Order comparisons should be done on the non-infinitesimal part only.

  2. Jet is an implementation of n-dimensional dual numbers, and is thus an algebra over the real numbers. In that case, no Order instance should exist, because dual numbers, as a d > 1 vector space, do not have a total order.

denisrosset commented 7 years ago

Ok.... there are a few issues.

Jet also inherits the ScalaNumeric stuff, with ugly hacks to perform arithmetic on Any.

The implementation is however good and well-commented. It should be split into parts to correspond to the different functions described above.