Use Real all the time

This commit is contained in:
serso committed 2016-04-09 21:12:15 +02:00
1 parent 1090ba856f
commit 29d4d77831
17 files changed
+994 -1073

No files matched your search

@@ -21,6 +21,7 @@ import android.widget.*;
import butterknife.Bind;
import butterknife.ButterKnife;
import jscl.JsclMathEngine;
import jscl.NumeralBase;
import midpcalc.Real;
import org.solovyev.android.calculator.*;
@@ -310,12 +311,13 @@ public class ConverterFragment extends BaseDialogFragment
if (!TextUtils.isEmpty(groupingSeparator)) {
value = value.replace(groupingSeparator, "");
}
return Double.longBitsToDouble(new Real(value).toDoubleBits());
final long bits = new Real(value).toDoubleBits();
return Double.longBitsToDouble(bits);
}
@Nonnull
private String formatDouble(double toValue) {
return JsclMathEngine.getInstance().formatDec(toValue);
return JsclMathEngine.getInstance().format(toValue, NumeralBase.dec);
}
@Override