Version 1.2.0 Release Notes
This release includes several new features and functions along with lots of little bug fixes and minor performance improvements. This version also comes as an installer, so you don’t have to move files around manually. Once you verify that the new one is working correctly, you’ll probably want to delete the old version since the installer won’t do that for you. It should keep your existing settings and script library.
New features
- Added syntax highlighting and an improved editing experience for the main input and script editor. You can choose from light and dark themes for the library script editor.
- You can now export the answer history as plain text, HTML (with pretty printing), or a script.
- Added a “mixed fractions” output option (i.e. “1 2/3” instead of “5/3”).
- In exact mode, you can copy the approximate/floating point result to the input by shift-clicking the answer.
- The maximum saved history length is now configurable (from 10 to 500)
- Experimental support for automatically adding missing right parentheses at the
end of expressions instead of throwing an error. For example,
2 * (3 + 4
would work and be treated just like2 * (3 + 4)
instead of complaining about the missing)
. It’s turned off by default, so you’ll need to enable it in the settings dialog.
Language enhancements
- Now supports multiple assignment. For example,
var (x, y) = [1, 2]
. - Added a new
<=>
comparison operator. Returns -1, 0, or 1 for less than, equal, or greater than.
New functions
- Added a
help(function)
to get help and/or usage information for built-in functions. You can add documentation for your own user-defined functions by callingsystem:setHelpText(myFunction, "Help text")
. factor(n)
function to find the prime factors ofn
.product(list)
- Multiply the elements oflist
together. The inverse offactor
.clone(list or matrix)
to make a deep clone of a list or matrix.bind(function, arg1, arg2, ...)
to bind arguments to a function (i.e. partial function application).- Added
system:type(x)
function. The previousexperimental:type
function is deprecated and will show a warning. - New Statistics functions:
mean
,median
,variance
,variancep
(population variance),std
andstdp
(sample and population standard deviation),covariance
andcovariancep
(sample and population covariance),correlation
andcorrelationp
(you get the idea). These are in thestats
namespace, so you’ll either need to callimport("stats")
first, or call them with thestats:
prefix, for examplestats:std([0.3, 0.1, 0.25, 0.333])
. - Two sorting functions,
sort(list)
andsortInPlace(list)
. They both accept an optional second argument that defines the sort order by comparing two list elements and returning -1, 0, or 1 to specify their order (just like the<=>
operator).sort
copies the list before sorting, andsortInPlace
modifies the original list. - Matrix QR decomposition function,
QR(matrix)
. - New special functions,
erf
andgamma
. roundTo(x, digits)
function to roundx
todigits
decimal places.
New experimental functions
These may have bugs and behave weirdly with unusual inputs, and their interface could change in future versions. You’re welcome and encouraged to try them and provide feedback though, just don’t count on them staying around in their current form or working in every case.
experimental:polyfit(x, y, degree)
- Find the best-fit polynomial with the specifieddegree
and points defined byx
andy
.experimental:adaptiveSimpsons(fn, a, b)
- Use the Adaptive Simpson’s method for numerical integration of functionfn
froma
tob
.
Additional fixes and enhancements
- Fixed some minor interface bugs.
- Improved startup speed when you have a lot of saved history entries.