From 6c2e211ae85d7de3d7f027e4aeaf382c34323097 Mon Sep 17 00:00:00 2001 From: Mubashshir Date: Tue, 12 Mar 2024 14:16:47 +0600 Subject: Implement gmp wrapper for calculations Signed-off-by: Mubashshir --- main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index a60839a..e9ebc81 100644 --- a/main.cpp +++ b/main.cpp @@ -1,7 +1,7 @@ +#define _USE_GMP #include #include -#include "headers/allElements.h" -#include "headers/baseElement.h" +#include "allElements.h" using namespace std; @@ -33,8 +33,8 @@ int main() return 0; } - double totalHeat = elements[choice - 1]->totalHeatNeeded(mass, fromTemp, toTemp); - double totalEntropy = elements[choice - 1]->totalEntropyChange(mass, fromTemp, toTemp); + double totalHeat = bigfloat_unwrap(elements[choice - 1]->totalHeatNeeded(mass, fromTemp, toTemp)); + double totalEntropy = bigfloat_unwrap(elements[choice - 1]->totalEntropyChange(mass, fromTemp, toTemp)); cout << "The total heat needed is: " << totalHeat << " J" << endl; cout << "The total entropy change is: " << totalEntropy << " J/K" << endl; return 0; -- cgit v1.2.3