Jump to content

Unicode polynomial equation: Difference between revisions

m
fractions printing
mNo edit summary
m (fractions printing)
Line 405:
sfrac = get(tofracs, c - trunc(c), "")
sint = string(Int(trunc(c)))
s = round(sfracc) == "")c ? string(c)sint : (sintsfrac == "0" ? ""string(c) : sint) * sfrac
sint == "0" ? sfrac : sint * sfrac
print(c == 1 && e != 0 ? "" : s)
e != 0 && print(lp.varname, tosuper(e))
Line 505 ⟶ 506:
</lang>{{out}}
<pre>
1x⁵ - 2x⁴ + 42x³ + 0x² + 40x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
0e+0x⁰⁰⁷ + 00e-00x + 0x + .0x⁰⁵ - 0.x⁴ + 0×x³ + 0x⁻⁰ + 0/x + 0/x³ + 0x⁻⁵ => 0.0
1x⁵ - 2x⁴ + 42x³ + 40x + 1x⁰ => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
+x⁺⁵ + -2x⁻⁻⁴ + 42x⁺⁺³ + +40x - -1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
x^5 - 2x**4 + 42x^3 + 40x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
x↑5 - 2.00·x⁴ + 42.00·x³ + 40.00·x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
x⁻⁵ - 2⁄x⁴ + 42x⁻³ + 40/x + 1x⁻⁰ => x⁻⁵ - 2.0x⁻⁴2x⁻⁴ + 42.0x⁻42x⁻³ + 40.0x⁻40x⁻¹ + 1.0
x⁵ - 2x⁴ + 42.000 000x³ + 40x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
x⁵ - 2x⁴ + 0,042x³ + 40.000,000x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
0x⁷ + 10x + 10x + x⁵ - 2x⁴ + 42x³ + 20x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
1E0x⁵ - 2,000,000.e-6x⁴ + 4.2⏨1x³ + .40e+2x + 1 => x⁵ - 2.0x⁴2x⁴ + 42.0x42x³ + 40.0x40x + 1.0
x⁵ - x⁴⁄2 + 405x³⁄4 + 403x⁄4 + 5⁄2 => x⁵ - ½x⁴ + 101¼x³ + 100¾x + 2½
x⁵ - ½x⁴ + 101¼x³ + 100¾x + 2½ => x⁵ - ½x⁴ + 101¼x³ + 100¾x + 2½
4,105

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.