aboutsummaryrefslogtreecommitdiff
path: root/editors/MathPlanner/files/patch-Sqrt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editors/MathPlanner/files/patch-Sqrt.cpp')
-rw-r--r--editors/MathPlanner/files/patch-Sqrt.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/editors/MathPlanner/files/patch-Sqrt.cpp b/editors/MathPlanner/files/patch-Sqrt.cpp
new file mode 100644
index 000000000000..7fe5d579890f
--- /dev/null
+++ b/editors/MathPlanner/files/patch-Sqrt.cpp
@@ -0,0 +1,23 @@
+--- src/Sqrt.cpp.orig Fri Aug 13 04:51:58 2004
++++ src/Sqrt.cpp Sun Sep 12 00:32:59 2004
+@@ -37,15 +37,15 @@
+
+ if (uv.type==MN_REAL && lv.type==MN_REAL) {
+
+- if (lv.R<0) {
+- if ((((int)uv.R)&1)==1) { //negative, odd
+- value.SetReal(-pow(-lv.R,(1.0/uv.R)));
++ if (lv.mpl.m.R<0) {
++ if ((((int)uv.mpl.m.R)&1)==1) { //negative, odd
++ value.SetReal(-pow(-lv.mpl.m.R,(1.0/uv.mpl.m.R)));
+ return(value);
+ }
+- else lv.type=MN_COMPLEX, lv.I=0; //negative, even
++ else lv.type=MN_COMPLEX, lv.mpl.m.I=0; //negative, even
+ }
+ else {
+- value.SetReal(pow(lv.R,(1.0/uv.R)));
++ value.SetReal(pow(lv.mpl.m.R,(1.0/uv.mpl.m.R)));
+ return(value);
+ }
+ }