JSFiddle - React, Tailwind, and code Playground

HTML

X = <input type='text' id='x' /> <br />
<input type='button' value='Calculate' id='b' />
<div id='res'></div>

JavaScript

$('#b').click(function(){
   var x = parseFloat($('#x').val());
   if (typeof x !== 'NaN') {
     $('#res').html('');
     var A = Math.pow(x + Math.PI, 8);
     var dx = Math.pow(Math.ceil(A), 1/8) - x - Math.PI;
     var checkA = Math.pow(x + dx + Math.PI, 8);
     $('#res').html('Oriniginal value = ' + A + '<br />\
        dx = ' + dx + '<br />\
        Corrected value = ' + checkA);
   };
});