Scilab-Branch-6.1-GIT
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
simp_mode
toggle rational simplification
Syntax
mod = simp_mode() simp_mode(mod)
Arguments
- mod
a boolean
Description
rational simplification is called after nearly each operations on
rationals. It is possible to toggle simplification on or off using
simp_mode
function.
simp_mode(%t)
set rational simplification mode on
simp_mode(%f)
set rational simplification mode off
mod=simp_mode()
returns in mod the current rational
simplification mode
Examples
s = %s; mod = simp_mode() simp_mode(%f); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2] simp_mode(%t); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2] simp_mode(mod);
--> mod = simp_mode() mod = T --> simp_mode(%f); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2] ans = 0 s s² s² -2s³ +s⁴ s -s² - - -- ----------- ----------- s s s s -s² s² -2s³ +s⁴ --> simp_mode(%t); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2] ans = 0 1 s s -s² -1 - - - ----- ------ 1 1 1 1 -s +s²
See also
- simp — rational simplification
Report an issue | ||
<< simp | Polynomials | sylm >> |