From d40a7e81e6354cc7c4fb87c047c1a747a7edbd00 Mon Sep 17 00:00:00 2001 From: mbkma Date: Tue, 2 Feb 2021 09:46:51 +0100 Subject: factorization: display prime factors in fixed number format --- src/math-equation.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/math-equation.c b/src/math-equation.c index 8f8c1c1..6a0a37a 100644 --- a/src/math-equation.c +++ b/src/math-equation.c @@ -1375,7 +1375,9 @@ math_equation_factorize_real(gpointer data) MPNumber x = mp_new(); MathEquation *equation = MATH_EQUATION(data); SolveData *result = g_slice_new0(SolveData); + MpDisplayFormat format = mp_serializer_get_number_format(equation->priv->serializer); + mp_serializer_set_number_format(equation->priv->serializer, MP_DISPLAY_FORMAT_FIXED); math_equation_get_number(equation, &x); factors = mp_factorize(&x); @@ -1418,6 +1420,8 @@ math_equation_factorize_real(gpointer data) g_string_free(text, TRUE); mp_clear(&x); + mp_serializer_set_number_format(equation->priv->serializer, format); + return NULL; } -- cgit v1.2.1