Elm Exactly

Derived formnegation

Stated in ADerived Forms, under Atomic Expressions atexp\atexp.

Derived Form\textnormal{Derived Form}Equivalent Form\textnormal{Equivalent Form}
-atexp\kw{-}\atexp(Basics.negate atexp)\kw{(}\kw{Basics.negate}\ \atexp\kw{)}
Read it in its chapter·Permanent address: /standard/derived-forms/negation

Tests (4)

  • elm / InfixNegatedOperandTest
    A negation symbol in an operator chain negates the atomic expression after it, and no more.
  • elm-core / FloatNegativeZeroTest
    Negative zero (`-0.0`) equals 0.0, and dividing 1.0 by it gives -Infinity while dividing by 0.0 gives Infinity.
  • elm-core / FloatSubTest
    Float subtraction gives the expected value, including when the right operand is a negative literal.
  • elm-core / IntSubTest
    Checks integer subtraction `-`, including subtracting a negative literal.

Discussions

Discuss this derived form·Search the discussions on GitHub

Discussions are on GitHub; one about this derived form has [df:negation] in its title.

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.