Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский
Scilab Help >> Polynomials > simp_mode

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
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:25 CET 2022