JavaScript Implementation of Interval Arithmetic.
This is a javascript library for Interval Arithmetic. Interval Arithmetic can avoid the arcuracy loss during floating point calculation. You can find out more about Interval Arithmetic and its uses on wikipedia.
Now this library is being used for implicit function plotting by https://zizhujy.js.org/zh-CN/FunctionGrapher.html.
scoop install ruby
scoop install msys2
gem install rake
bundle install
The js test cases can be executed by phantomjs, to install it, run:
brew install --cask phantomjs
With the above toolchain installed, you can just type rake
to run tests.
In mac osx:
GEM_PATH=ruby/2.6.0 rake --trace
open the html report file indicated by the command line output in the above step:
open file:///Users/cnjeftia/jeff-tian/JavaScriptIntervalArithmetic/Source/Scripts.Test/spec/zizhujy.com.IntervalArithmetic.Spec.html?spec=zizhujy.com.IntervalArithmetic%20test%20suite
- mac os
bundle install
errors:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.3.7) required by your /Users/cnjeftia/jeff-tian/JavaScriptIntervalArithmetic/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.3.7`
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/bin/bundle:23:in `<main>'
You can fix it follow the error messages, or just type
sudo gem install bundler
to install latest bundler
Refer to https://www.yuque.com/tian-jie/blog/xsh9nz, run
sudo spctl --master-disable