I want to exponentially increase the speed of changing the value of a variable. I tried to do this, but it did not work out. When trying to do this, I used 2 setInterval, but it did not work. In the code below I tried to increase the speed in changing the value of the variable x, but it did not work very well. I would like you to help me and I would also like to know how I can exponentially increase the speed of changing the value of the variable x.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<p id="vel"></p>
<script>
var x = 100;
var y = 1000;
document.getElementById("vel").innerHTML = x;
var exponencial = setInterval(function() {
y -= 2*pow(2, 4);
}, 1000);
var time = setInterval(function() {
x += 1;
document.getElementById("vel").innerHTML = x;
}, y);
</script>
</body>
</html>