Git Product home page Git Product logo

mathjs-simple-integral's People

Contributors

joelahoover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mathjs-simple-integral's Issues

Cant import module

I tried:
Code:
var math = require('mathjs')
var math2 = math.create(math.all)
math2.import(require('mathjs-simple-integral'));

But this returned:
Error: Cannot import "factory": already exists

What can i do?

mathjs-simple-integral in React Native

How do you import mathjs-simple-integral into a React Native project? I already imported mathjs into my React Native project and it works beautifully, and now I would like to import the mathjs-simple-integral extension too.

The way I imported mathjs is

import { derivative, evaluate, parse, format, unit, simplify, math, max, min, complex, add, multiply, equal, sort, sqrt, exp, log, sin, cos, tan, sec, csc, cot, asin, acos, atan, acot, sinh, cosh, tanh, coth, asinh, acosh, atanh, acoth } from 'mathjs';

and this works. This is how I usually import things into React Native.

I tried to import mathjs-simple-integral similarly by inserting,

import { integral } from 'mathjs-simple-integral';

or just

import integral from 'mathjs-simple-integral';

which by itself did not return any error, but when I tried to compute

const a = integral('x^2', 'x')

I get an error

(0,_mathjsSimpleIntegral.integral) is not a function. (In ‘(0,_mathjsSimpleIntegral.integral)(‘x^2’, ‘x’)’, ‘(0,_mathjsSimpleIntegral.integral)’ is undefined)

However, computing

const a = derivative(‘x^2', 'x')

works well (because derivative comes with mathjs, which I managed to import well).

I also tried inserting

math.import(require('mathjs-simple-integral'));

and

require('mathjs-simple-integral')

into my React Native project but that did not help either. The former gives me an error undefined is not an object (evaluating '_mathjs.math.import') and the latter gives me the error Can't find variable: integral

Because this is an extension to mathjs, all this makes me think that mathjs-simple-integral probably needs to be imported differently than usual libraries. Any help would be greatly appreciated!

Fuse this with Mathjs?

Why not make this extension a part of mathjs(since integrals are really important/used nowadays)?

Can't compile the resulting expression

Hello!

I'm very new to mathjs, but this looks like an amazing library
I need to compute and use an integral for one of my projects, but it looks to me like there is a small bug with this lib:

Doing this:

math.integral('x^2', 'x').compile();

raises a arg._compile is not a function exception

But this:

math.parse(math.format(math.integral('x^2', 'x'))).compile();

works fine

I've tried tracking the problem down, and by comparing the json
representations of these two:

math.integral('x^2', 'x')
math.parse(math.format(math.integral('x^2', 'x')))

I can only find one difference:

// math.integral output
{"name":"x"}

// serialized then parsed output
{"mathjs":"SymbolNode","name":"x"}

I hope that was clear, and that I'm not missing something obvious (as I said, this is the first time I use both your lib and mathjs)

Cheers!

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.