A calculator designed to handle large numbers, featuring a 12-digit display.
function performCalculation() {
var numInput = document.getElementById(‘numInput’).value;
if (!numInput) {
alert(‘Please enter a number’);
return;
}
var result = parseFloat(numInput) * 2; // Example calculation: multiply input by 2
document.getElementById(‘numResult’).value = result.toFixed(12); // Display result with 12 decimal places
}
function clearCalculation() {
document.getElementById(‘numInput’).value = ”;
document.getElementById(‘numResult’).value = ”;
}