<style>
.elem {
display: flex;
align-items: center;
}
.cont {
text-align: center;
display: inline-block;
}
.sign {
margin: 0;
height: 1px;
border: none;
background: #000000;
}
</style>
<div class="elem">
<div class="cont">1<hr class="sign">777</div>  + 
<div class="cont">458<hr class="sign">3</div>  − 
<div class="cont">784<hr class="sign">689</div>
</div>
const decimalPlaces = number => {
if (number.toString().split(/[\.e]/).length === 1) return 0
let result
// @ts-ignore
number.toString().replace(/[\.e]/, reg => {
switch (reg) {
case '.': {
result = number.toString().split('.')[1].length
return
}
case 'e': {
result = Math.abs(number.toString().split('e')[1])
return
}}})
return result
}
console.log(decimalPlaces(0.000000000000001)) // 15
console.log(decimalPlaces(17.41452)) // 5
console.log(decimalPlaces(10)) // 0