Code Monkey home page Code Monkey logo

p6-math-constants's People

Contributors

advy99 avatar afresh1 avatar blancabgz avatar jj avatar jtpalmer avatar juane99 avatar kjpye avatar mrexsp avatar salvacorts avatar samcv avatar thebooort avatar xliff avatar yugandhartripathi avatar zoffixznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

p6-math-constants's Issues

Math::Constants and Physics::Constants

Dear JJ, I see that you write this in your excellent module:

[in Math::Constants]
my constant plancks-h is export = 6.626_070_015e-34; # exact

In my world (https://github.com/p6steve/raku-Physics-Measure/blob/master/README.md) I would write:

use Physics::Measure;
my $h ♎️ "6.626196e-34 J/s";
say ~($h * 1e34); #6.626 J/s
say $h.WHAT; #(Power)

I am trying to avoid hard coding the physical constants into Physics::Measure since Math::Constants already does a much better job!

I have in mind conceptually::
0. A new raku module - lets say Physics::Constants, it does...

  1. use Math::Constants to get the numbers (and unit definition?)
  2. for all-symbols { my constant * is export ♎️ "*.Real *.UnitDefn" }

I attach a suggested an informal object mapping diagram - red is Physic::Measure, green is Math::Constant, purple is my new module suggestion.
Screenshot 2020-05-06 21 00 05

Please let me know if this makes any sense and you are open to the idea? If so, I am happy to code this up, test and submit - really as you decide.

kind regards
p6steve

Incorrect values for some constants

  1. The module superfluously defines e and pi, and in the case of pi has an incorrect value!

  2. Since 2019-05-20, planck's constant and the electron charge have defined values, different to those in this module. According to Wikipedia, the new values are 6.626_070_15e-34 and 1.602_176_634e-19 respectively.

Since that effectively redefines the meter and the ampere, this may have side-effects for other constants. (The obvious one is Planck's reduced constant.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.