﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.98.6179.21440"?>
<regions>
  <settings>
    <identity>
      <id>9dfdb119-8a54-4059-a209-9dfdfe5c657a</id>
      <revision>6</revision>
    </identity>
    <metadata lang="rus">
      <title>Алгоритм Евклида (определение НОД)</title>
      <author>Андрей Ивашов</author>
      <description>Эффективный метод вычисления наибольшего общего делителя (НОД), также известный как алгоритм Евклида.
Пользователь задаёт два числа для которых будет вычислен НОД. Пример является численным и демонстрирует работу с циклом типа While.</description>
      <company>SMath, http://smath.info/</company>
      <keywords>Примеры, НОД, Евклид</keywords>
    </metadata>
    <metadata lang="ind">
      <title>Algoritman Euclid yaitu untuk menghitung FPB</title>
      <author>Andrey Ivashov</author>
      <translator>Waluyo Adi Siswanto</translator>
      <description>Algotritma Euclid merupakan metode yang efisien untuk menghitung Greatest Common Divisor (GCD), atau di Indonesia dikenal sebagai Faktor Persekutuan terBesar (FPB). Pemakai program ini perlu menuliskan dua angka yang akan dihitung FPB nya. Program ini menggunakan operasi gelung dengan perintah While.</description>
      <company>SMath, http://smath.info/</company>
      <keywords>Contoh, GCD, FPB, Algoritma Euclid</keywords>
    </metadata>
    <metadata lang="eng">
      <title>Euclidean algorithm (calculating the GCD)</title>
      <author>Andrey Ivashov</author>
      <translator>Andrey Ivashov</translator>
      <description>Efficient method for computing the greatest common divisor (GCD), also known as the greatest common factor (GCF) or highest common factor (HCF). The algorithm is also called Euclid's algorithm.
User fills in two numbers to find out the GCD. This is a simple Numeric example, that uses While Loop inside.</description>
      <company>SMath, http://smath.info/</company>
      <keywords>Examples, GCD, Euclid</keywords>
    </metadata>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="1" orientation="Portrait" width="850" height="1100" />
      <margins left="39" right="39" top="39" bottom="39" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="0.98.6179.21440" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Math Region" version="0.98.6179.21440" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="Special Functions" version="1.11.6179.21442" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
    </dependencies>
    <mode debug="true" />
  </settings>
  <region id="0" left="36" top="18" width="244" height="138" border="true" color="#000000" bgColor="#ebebeb" fontSize="10">
    <math>
      <description active="true" position="Top" lang="eng">
        <p>Adapted from Andrey Ivashov</p>
      </description>
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">gcd</e>
        <e type="operand">x</e>
        <e type="operand">a</e>
        <e type="function" preserve="true" args="1">abs</e>
        <e type="operator" args="2">:</e>
        <e type="operand">y</e>
        <e type="operand">b</e>
        <e type="function" preserve="true" args="1">abs</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" preserve="true" args="4">mat</e>
        <e type="operand">x</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≠</e>
        <e type="bracket">(</e>
        <e type="operand">y</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≠</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">&amp;</e>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">x</e>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="function" preserve="true" args="2">mod</e>
        <e type="operator" args="2">:</e>
        <e type="operand">y</e>
        <e type="operand">y</e>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="2">mod</e>
        <e type="operator" args="2">:</e>
        <e type="function" preserve="true" args="3">if</e>
        <e type="function" preserve="true" args="2">while</e>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operator" args="2">+</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="5">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="1" left="288" top="27" width="51" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">21</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="2" left="360" top="27" width="43" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">b</e>
        <e type="operand">6</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="3" left="288" top="54" width="214" height="47" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2">
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">lcm</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operator" args="2">*</e>
        <e type="function" preserve="true" args="1">abs</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">gcd</e>
        <e type="operator" args="2">/</e>
        <e type="function" preserve="true" args="1">eval</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="4" left="288" top="108" width="122" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">lcm</e>
      </input>
      <result action="numeric">
        <e type="operand">42</e>
      </result>
    </math>
  </region>
  <region id="5" left="288" top="144" width="142" height="49" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">gcd</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">lcm</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="4">mat</e>
      </input>
      <result action="numeric">
        <e type="operand">3</e>
        <e type="operand">42</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="4">mat</e>
      </result>
    </math>
  </region>
  <region id="6" left="36" top="198" width="76" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">20405</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="7" left="126" top="198" width="76" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">b</e>
        <e type="operand">84645</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="8" left="36" top="234" width="122" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">gcd</e>
      </input>
      <result action="numeric">
        <e type="operand">55</e>
      </result>
    </math>
  </region>
  <region id="9" left="36" top="270" width="163" height="83" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">gcd</e>
        <e type="operator" args="2">/</e>
        <e type="operand">b</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">gcd</e>
        <e type="operator" args="2">/</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="4">mat</e>
      </input>
      <result action="numeric">
        <e type="operand">371</e>
        <e type="operand">1539</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="4">mat</e>
      </result>
    </math>
  </region>
</regions>