aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahmubashshir@gmail.com>2024-03-12 14:16:47 +0600
committerLibravatar Mubashshir <ahmubashshir@gmail.com>2024-03-12 14:16:47 +0600
commit6c2e211ae85d7de3d7f027e4aeaf382c34323097 (patch)
tree446a3682aca98aca2a0f1e29fb7606c81389d41c /main.cpp
parent8808dbe579cb4a935e32b3abfb2de81cf796e977 (diff)
downloadentropy-calc-6c2e211ae85d7de3d7f027e4aeaf382c34323097.tar.gz
entropy-calc-6c2e211ae85d7de3d7f027e4aeaf382c34323097.zip
Implement gmp wrapper for calculations
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
Diffstat (limited to '')
-rw-r--r--main.cpp8
1 files changed, 4 insertions, 4 deletions
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 <iostream>
#include <vector>
-#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;