PageRenderTime 28ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/latest/modules/physics/units/prefixes.html

https://github.com/sympy/sympy_doc
HTML | 159 lines | 148 code | 11 blank | 0 comment | 0 complexity | b20bea975f4f543049f82a33781e1e42 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
  6. <title>Unit prefixes &#8212; SymPy 1.10.1 documentation</title>
  7. <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
  8. <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
  9. <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
  10. <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
  11. <link rel="stylesheet" type="text/css" href="https://live.sympy.org/static/live-core.css" />
  12. <link rel="stylesheet" type="text/css" href="https://live.sympy.org/static/live-autocomplete.css" />
  13. <link rel="stylesheet" type="text/css" href="https://live.sympy.org/static/live-sphinx.css" />
  14. <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
  15. <script src="../../../_static/jquery.js"></script>
  16. <script src="../../../_static/underscore.js"></script>
  17. <script src="../../../_static/doctools.js"></script>
  18. <script src="https://live.sympy.org/static/utilities.js"></script>
  19. <script src="https://live.sympy.org/static/external/classy.js"></script>
  20. <script src="https://live.sympy.org/static/live-core.js"></script>
  21. <script src="https://live.sympy.org/static/live-autocomplete.js"></script>
  22. <script src="https://live.sympy.org/static/live-sphinx.js"></script>
  23. <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
  24. <link href="https://docs.sympy.org/latest/modules/physics/units/prefixes.html" rel="canonical" />
  25. <link rel="index" title="Index" href="../../../genindex.html" />
  26. <link rel="search" title="Search" href="../../../search.html" />
  27. <link rel="next" title="Units and unit systems" href="unitsystem.html" />
  28. <link rel="prev" title="Dimensions and dimension systems" href="dimensions.html" />
  29. </head><body>
  30. <div class="related" role="navigation" aria-label="related navigation">
  31. <h3>Navigation</h3>
  32. <ul>
  33. <li class="right" style="margin-right: 10px">
  34. <a href="../../../genindex.html" title="General Index"
  35. accesskey="I">index</a></li>
  36. <li class="right" >
  37. <a href="../../../py-modindex.html" title="Python Module Index"
  38. >modules</a> |</li>
  39. <li class="right" >
  40. <a href="unitsystem.html" title="Units and unit systems"
  41. accesskey="N">next</a> |</li>
  42. <li class="right" >
  43. <a href="dimensions.html" title="Dimensions and dimension systems"
  44. accesskey="P">previous</a> |</li>
  45. <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.10.1 documentation</a> &#187;</li>
  46. <li class="nav-item nav-item-1"><a href="../../../reference/index.html" >Reference Documentation</a> &#187;</li>
  47. <li class="nav-item nav-item-2"><a href="../../../reference/public/physics/index.html" >Physics</a> &#187;</li>
  48. <li class="nav-item nav-item-3"><a href="index.html" accesskey="U">Unit systems</a> &#187;</li>
  49. <li class="nav-item nav-item-this"><a href="">Unit prefixes</a></li>
  50. </ul>
  51. </div>
  52. <div class="document">
  53. <div class="documentwrapper">
  54. <div class="bodywrapper">
  55. <div class="body" role="main">
  56. <section id="module-sympy.physics.units.prefixes">
  57. <span id="unit-prefixes"></span><h1>Unit prefixes<a class="headerlink" href="#module-sympy.physics.units.prefixes" title="Permalink to this headline"></a></h1>
  58. <p>Module defining unit prefixe class and some constants.</p>
  59. <p>Constant dict for SI and binary prefixes are defined as PREFIXES and
  60. BIN_PREFIXES.</p>
  61. <dl class="py class">
  62. <dt class="sig sig-object py" id="sympy.physics.units.prefixes.Prefix">
  63. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">sympy.physics.units.prefixes.</span></span><span class="sig-name descname"><span class="pre">Prefix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">abbrev</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exponent</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">base</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/77f1d79c705da5e9b3dee456a14b1b4e92dd620c/sympy/physics/units/prefixes.py#L11-L114"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.units.prefixes.Prefix" title="Permalink to this definition"></a></dt>
  64. <dd><p>This class represent prefixes, with their name, symbol and factor.</p>
  65. <p>Prefixes are used to create derived units from a given unit. They should
  66. always be encapsulated into units.</p>
  67. <p>The factor is constructed from a base (default is 10) to some power, and
  68. it gives the total multiple or fraction. For example the kilometer km
  69. is constructed from the meter (factor 1) and the kilo (10 to the power 3,
  70. i.e. 1000). The base can be changed to allow e.g. binary prefixes.</p>
  71. <p>A prefix multiplied by something will always return the product of this
  72. other object times the factor, except if the other object:</p>
  73. <ul class="simple">
  74. <li><p>is a prefix and they can be combined into a new prefix;</p></li>
  75. <li><p>defines multiplication with prefixes (which is the case for the Unit
  76. class).</p></li>
  77. </ul>
  78. </dd></dl>
  79. </section>
  80. <div class="clearer"></div>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  85. <div class="sphinxsidebarwrapper">
  86. <p class="logo"><a href="../../../index.html">
  87. <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
  88. </a></p>
  89. <div>
  90. <h4>Previous topic</h4>
  91. <p class="topless"><a href="dimensions.html"
  92. title="previous chapter">Dimensions and dimension systems</a></p>
  93. </div>
  94. <div>
  95. <h4>Next topic</h4>
  96. <p class="topless"><a href="unitsystem.html"
  97. title="next chapter">Units and unit systems</a></p>
  98. </div>
  99. <div role="note" aria-label="source link">
  100. <h3>This Page</h3>
  101. <ul class="this-page-menu">
  102. <li><a href="../../../_sources/modules/physics/units/prefixes.rst.txt"
  103. rel="nofollow">Show Source</a></li>
  104. </ul>
  105. </div>
  106. <div id="searchbox" style="display: none" role="search">
  107. <h3 id="searchlabel">Quick search</h3>
  108. <div class="searchformwrapper">
  109. <form class="search" action="../../../search.html" method="get">
  110. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  111. <input type="submit" value="Go" />
  112. </form>
  113. </div>
  114. </div>
  115. <script>$('#searchbox').show(0);</script>
  116. </div>
  117. </div>
  118. <div class="clearer"></div>
  119. </div>
  120. <div class="related" role="navigation" aria-label="related navigation">
  121. <h3>Navigation</h3>
  122. <ul>
  123. <li class="right" style="margin-right: 10px">
  124. <a href="../../../genindex.html" title="General Index"
  125. >index</a></li>
  126. <li class="right" >
  127. <a href="../../../py-modindex.html" title="Python Module Index"
  128. >modules</a> |</li>
  129. <li class="right" >
  130. <a href="unitsystem.html" title="Units and unit systems"
  131. >next</a> |</li>
  132. <li class="right" >
  133. <a href="dimensions.html" title="Dimensions and dimension systems"
  134. >previous</a> |</li>
  135. <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.10.1 documentation</a> &#187;</li>
  136. <li class="nav-item nav-item-1"><a href="../../../reference/index.html" >Reference Documentation</a> &#187;</li>
  137. <li class="nav-item nav-item-2"><a href="../../../reference/public/physics/index.html" >Physics</a> &#187;</li>
  138. <li class="nav-item nav-item-3"><a href="index.html" >Unit systems</a> &#187;</li>
  139. <li class="nav-item nav-item-this"><a href="">Unit prefixes</a></li>
  140. </ul>
  141. </div>
  142. <div class="footer" role="contentinfo">
  143. &#169; Copyright 2022 SymPy Development Team.
  144. Last updated on Mar 19, 2022.
  145. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
  146. </div>
  147. </body>
  148. </html>