About: Sign and division functions   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

The absolute value function returns the "size" of a number. The size of a nonnegative number X is always X itself, but if the number is negative it is -X. On implementation need the function would in C and C++ look like:

AttributesValues
rdfs:label
  • Sign and division functions
rdfs:comment
  • The absolute value function returns the "size" of a number. The size of a nonnegative number X is always X itself, but if the number is negative it is -X. On implementation need the function would in C and C++ look like:
dcterms:subject
abstract
  • The absolute value function returns the "size" of a number. The size of a nonnegative number X is always X itself, but if the number is negative it is -X. On implementation need the function would in C and C++ look like: double dabs (double X) { if (X >= 0) return X; return -X; } This may pose problems if the argument is int, in which case another specialized function iabs for integers and fabs for single precision float are desired. C, C++ and most other strongly typed programming languages all have this problem, but in C++ and other generic/template providing PL:s using templates is an alternative, such as in C++: template NUM abs (NUM X) { if (X >= 0) return X; return -X; } which if to be used somewhere either can be explicitly accessed like: float K; K = get_my_float_val (something); K = abs(K); or is implicitly deduced by compiler so that double D, I, X; I = abs(1); // accesses abs X = abs(1.1); // accesses abs D = abs(D); // accesses abs
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software