Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
Hay algo mal con mis algoritmos de maniobras

Tengo un problema al trabajar con el algoritmo de maniobras: lo uso para analizar una ecuación y luego uso esa ecuación para dibujar un gráfico, pero de alguna manera está analizando x^2-0.5x+1 a -0.5x+1, ¿hay alguna forma de corrija eso Aquí el enlace al código de prueba: https://codepen.io/Inasaya-Flanderin/pen/ExbbgQm Esta es la parte del código:

 function parse(rpn) { let stack = []; Array.from(rpn).forEach((t) => { let tr = null; if (isNumber(t) || isVariable(t)) { tr = genNode(t, false); } else { if (Object.keys(binary_functions).includes(t)) { tr = genNode(binary_functions[t], true, false); let a = stack.pop(); let b = stack.pop(); if (typeof a === 'number') { tr.right = genNode(a, false); } else { tr.right = a; } if (typeof b === 'number') { tr.left = genNode(b, false); } else { tr.left = b; } } else if (Object.keys(unary_functions).includes(t)) { tr = genNode(unary_functions[t]); a = stack.pop(); if (typeof a === 'number') { tr.left = genNode(a, false); } else { tr.left = a; } } } tr.name = t; stack.push(tr); }); return stack.pop(); } function eval(tree) { if (tree.func) { if (tree.unary) { return tree.val.eval(eval(tree.left)); } else { return tree.val.eval(eval(tree.left), eval(tree.right)); } } else { if (constant_names.includes(tree.val)) { return constants[tree.val]; } else if (varnames.includes(tree.val)) { return variables[tree.val]; } else { return tree.val; } } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!