Skip to content

multi language Antegral Calculator in (java,js,python)

License

Notifications You must be signed in to change notification settings

ali77gh/Antegral-Derivation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Antegral

java

Antegral antegral = new Antegral(new IFunc() {

        @Override
        public double func(double input) {
            // defind  function here
            return 4 * input;
        }
});

antegral.calcute(0, 2); // this will return Area

python3

import Antegral 
# put your function here
def func(input):
    return input*2

sum = Antegral.Calculate(0,2,func)

js

var antegral = require("./Antegral");

var sum = antegral.calcute(0, 2,
    function (x) {
        return 2 * x;//put your function here
    }
);

Derivation

java

Derivation derivation = new Derivation(new IFunc() {
       @Override
       public double func(double input) {
           return input * input;
       }
});

derivation.calcute(10);

python3

import Derivation
# put your function here
def func(input):
    return input*2

sum = Derivation.Calculate(10,func)

js

var derivation = require("./Derivation");

var an = derivation.calcute(10,(x)=>{
    //your function here
    return x*x;
});

Test

function : 2x , start : 0 , end : 2
python: 0.162s
javascript: 0.457s
java: 0.095s
right answer : 4 program answer : 4.00002

About

multi language Antegral Calculator in (java,js,python)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published