
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Wrapper around Ruby Math module; Has additional methods.
http://rubygems.org/gems/mathematics
--------------
mathematics.rb
--------------
IMPORTANT NOTE:
--------------
This program introduces/relies on "Prior Knowledge"
in the domain of mathematics, and avoids
computation where unnecessary.
Also, resorting to computation sometimes doesn't yield
perfect results as known/anticipated. Example:
(environment: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0])
$ ruby -e "puts Math.sin(Math::PI) # I expect 0"
1.2246467991473532e-16
Under the hood of "Prior Knowledge" style/paradigm of programming,
some characteristic functions can manifest as "Intelligent Functions".
The intelligent function can rely on proven, tested, established
knowledge bases/answers; retrieving the result(s) can be on one or
more of these lines ...
. from cache (in-memory/local/remote/distributed)
. via delegation
. via rpc/rest/*cloud calls
.. depending on the need/nature of the "intelligent function" in the
domain space, and the prior knowledge of the complexity vis-a-vis
the path to take (not resorting to any call based on judgement,
distills down to a normal function,
which is a subset of the intelligent function).
gem install mathematics
require 'mathematics'
Mathematics.add(1,2)
Mathematics.sum(1,2,3)
Mathematics.total(1,2,3,4)
Mathematics.average(1,2,3)
Mathematics.avg(1,2,3,4)
Mathematics.mean(1,2,3,4,5)
Mathematics.sin(0)
Mathematics.cos(0)
Mathematics.sin(Math::PI/2)
Mathematics.cos(Math::PI/2)
Feel free to provide comments
FAQs
Unknown package
We found that mathematics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.