<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Python `abs()`函數 > 原文: [https://thepythonguru.com/python-builtin-functions/abs/](https://thepythonguru.com/python-builtin-functions/abs/) * * * 于 2020 年 1 月 7 日更新 * * * `abs()`函數返回數字的絕對值(大小無符號)。 其語法如下: ```py abs(x) -> absolute value ``` | 參數 | 描述 | | --- | --- | | `x` | 任何數值 | 這是一個例子: ```py >>> >>> abs(-45) 45 >>> >>> >>> abs(-3.14) 3.14 >>> >>> >>> abs(10) 10 >>> >>> >>> abs(2+4j) 4.47213595499958 >>> ``` ```py print(abs(-45)) print(abs(-3.14)) print(abs(10)) print(abs(2+4j)) ``` 對于整數和浮點數,結果非常明顯。 如果是`z = x + yi`的復數,則`abs()`函數將按如下方式計算絕對值: 絕對值:`|z| = √x2 + y2` ```py => 2+4j => √22 + 42 => √4 + 16 => √20 => 2√5 => 2*2.236 => 4.472 ``` * * * * * *
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看