Documentation/Calc Functions/RÅSUBTRAHER

    From The Document Foundation Wiki
    This page is a translated version of the page Documentation/Calc Functions/RAWSUBTRACT and the translation is 14% complete.
    Outdated translations are marked like this.


    Funktionsnavn:

    RÅFRATRÆK

    Kategori:

    Matematisk

    Resume:

    Subtraherer et sæt tal og giver resultatet uden at fjerne små afrundingsfejl.

    Note pin.svg

    Note
    For many users, Calc's minus (-) subtraction operator does exactly what they need, cancelling out any small roundoff errors that arise because not every decimal number can be exactly represented as a binary floating-point number. Use RÅFRATRÆK if you do not want those small roundoff errors to be eliminated.

    Syntaks:

    RÅFRATRÆK(Minuend; Subtrahend 1[; Subtrahend 2[; … ;[ Subtrahend 254]]])

    Returnerer:

    Subtraherer subtrahend(erne) fra minuenden uden at fjerne afrundingsfejl og returnerer et reelt tal.

    Argumenter:

    Minuend (obligatorisk) er et reelt tal eller en reference til et celle, der indeholder det tal, hvorfra der tallene skal subtraheres.

    Subtrahend 1[; Subtrahend 2][; ... ;[ Subtrahend 254]] er reelle tal eller referencer til celler, der indeholder de tal, der skal subtraheres fra minuenden. Mindst en subtrahend er obligatorisk.

    • Funktionen bør kaldes med mindst to parametre.
    • If any argument is a reference to a cell that contains non-numeric data, then RÅFRATRÆK reports a #VÆRDI! error.
    • If any argument is a reference to a cell that is empty, then RÅFRATRÆK treats it as containing 0.

    Yderligere oplysninger:

    • Ingen
    • RÅFRATRÆK uses the IEEE Standard for Floating-Point Arithmetic (IEEE 754) subtraction operation that the platform/compiler provides. The formula =RÅFRATRÆK(0.3; 0.2; 0.1) does not return 0 but instead returns the value -2.77555756156289E-17. This demonstrates that a small roundoff error has arisen that would be of no significance to many users. However, for some applications visibility of this error could be useful, for example, when determining whether two values are identical.
      Note pin.svg

      Bemærk:
      To get this result you may need to uncheck the Limit decimals for general number format option in the General Calculations area of the Tools ▸ Options ▸ LibreOffice Calc ▸ Calculate dialog (LibreOffice ▸ Preferences ▸ LibreOffice Calc ▸ Calculate on macOS).

      • RÅFRATRÆK can be used to compare whether a result exactly matches an expected number, that is, if =RÅFRATRÆK(result; expected) is equal to 0.0.
      • RÅFRATRÆK processes arguments from left to right. For example, =RÅFRATRÆK(1; 2; 3; 4) calculates 1-2-3-4 or ((1-2)-3)-4 in "natural" order.

      Eksempler:

      Formel Beskrivelse Returnerer
      =RÅFRATRÆK(10; 3; 2; 1) Here the function produces the same result as the subtraction operator. 4
      =RÅFRATRÆK(D1; D2; D3) where cells D1, D2 and D3 contain the numbers 1.6, 1.2, and 0.4 respectively. Here the function produces a non-zero result that shows a small roundoff error. 1.11022302462516E−16
      =RÅFRATRÆK(0,987654321098765; 0,9876543210987) Here the function is used to determine the difference between two numbers, producing the same result as the subtraction operator. 6.50590692430342E−14

      Beslægtede LibreOffice-funktioner:

      None.

      ODF standard:

      Ingen

      Relaterede (eller lignende) Excel-funktioner:

      Ingen