Zend certified PHP/Magento developer

The sum of two decimal numbers [closed]

I use the following code to sum the numbers in the lines in the textarea environment. The problem is that it does not add decimal numbers correctly. For example, the sum of the numbers 1.3 and 1.5 is represented by the number 5. Where is the problem in the code and what is the solution to fix the problem?
In the textarea, the numbers are written as follows to be added together:

1.3-1.6
2.4-3.9
...


      var textarea = document.getElementById("textarea");
      var value = textarea.value;
      
      var regex = /(d+)-(d+)/g;
      var matches = value.matchAll(regex);
      
      var sum = 0;
      for (const match of matches) {
        var v = parseInt(match[1]);
        sum += v;
      }
      console.log(sum);