Jump to content

Category talk:Wren-fmt: Difference between revisions

→‎Source code: Fixed a bug in spwrite routine.
(→‎Source code: Added support for Unicode number formats and printing polynomials.)
(→‎Source code: Fixed a bug in spwrite routine.)
Line 980:
if (coef == 0) continue
if (coef > 0) {
pvar = p + " + " + ((coeft == 1 && pow > 0) ? "": Fmt.swrite(fmt, coef))
if (pow > 0 && coef == 1 && t[-1] == "1") t = t[0...-1]
p = p + " + " + t
} else {
pvar = p + " - " + ((coeft == -1 && pow > 0) ? "": Fmt.swrite(fmt, -coef))
if (pow > 0 && coef == -1 && t[-1] == "1") t = t[0...-1]
p = p + " - " + t
}
if (pow > 1) {
9,490

edits

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