Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Русский


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 >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:55:06 CEST 2024