Javascript math function resolver

NotanNimda

I'm trying to make a function where you will input your variables in an HTML form and it will calculate all Y points, but for some reasons this line of code doesn't work: m * ( x * x ) + c * x + p = points; I don't know if my syntax is wrong or something? Full code is here:

var m = document.getElementById("m").value;
var c = document.getElementById("c").value;
var p = document.getElementById("p").value;
var x = -10;
var points;
var y = -10;
var functionPoints = points[0];
function functionResolver(m, c, p) {
        while ( x > -11 && x < 11 ) {
         m * ( x * x ) + c * x + p = points;
         points[y] = points;
         y += 1;
         x += 1;
       };
     };
Christopher Vickers

The program will do it in order of PEMA. You can either place extra brackets around the calculations or break the calculation down into smaller parts.

•Parentheses •Exponents •Multiplication/Division (left to right) •Addition/Subtraction (left to right).

For example

(m * ( x * x )) + c * x + p = points;

would be different to

m * ( x * x ) + (c * x) + p = points;

which would be different to

**m * ( x * x ) + (c * (x + p)) = points;

Also the parts might not be numbers so convert to numbers using Number()

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

javascript TypeError: Math.random is not a function on chrome

From Dev

Javascript assignment multiplication operators in a loop as a Math function

From Dev

Math.random() javascript function *undefined* on Chrome

From Dev

Javascript assignment multiplication operators in a loop as a Math function

From Dev

Hypotenuse using function & Math.sqrt() javascript

From Dev

Reverse array with math.floor function in javascript

From Dev

Convert javascript Max function wrapper to function pointer to Math.Max

From Dev

Chrome/Chromium doesn't know JavaScript function Math.sign

From Dev

Why does this math function return different values in Java and JavaScript?

From Dev

confusing javascript Math.cos function return value

From Dev

Chrome/Chromium doesn't know JavaScript function Math.sign

From Dev

insert math functions in math function

From Dev

Binary search for math function

From Dev

LibreOffice basic math function

From Dev

MySQL Math on "join" function

From Dev

Hierarchical Excel Math Function

From Dev

Programming a math function in python

From Dev

Binary search for math function

From Dev

Math in a NodeRed function block

From Dev

Using overridden math function

From Dev

Evaluating Latex Math in Javascript

From Dev

Javascript Difference Percentage Math

From Dev

Javascript math efficiency rounding

From Dev

Javascript precision with math libraries

From Dev

Javascript Map/Math/Table

From Dev

JavaScript math issue

From Dev

javascript math with dynamic fields

From Dev

Extending Math object in JavaScript

From Dev

Javascript math operation outcome