Divide

See javadoc - uk.gov.gchq.koryphe.impl.function.Divide

Available since Koryphe version 1.0.0

The input integers are divided. [x, y] -> [x/y, remainder]

Examples

Divide inputs

Java
JSON
Full JSON
Python
final Divide function = new Divide();
{
  "class" : "Divide"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.Divide"
}
g.Divide()

Input type:

java.lang.Integer, java.lang.Integer

Example inputs:

Input TypeInputResult TypeResult
[java.lang.Integer, java.lang.Integer][6, 2][java.lang.Integer, java.lang.Integer][3, 0]
[java.lang.Integer, java.lang.Integer][6, 4][java.lang.Integer, java.lang.Integer][1, 2]
[java.lang.Integer, java.lang.Integer][6, 8][java.lang.Integer, java.lang.Integer][0, 6]
[ ,java.lang.Integer][null, 2]null
[java.lang.Integer, ][6, null][java.lang.Integer, java.lang.Integer][6, 0]
[java.lang.Double, java.lang.Double][6.1, 2.1]IllegalArgumentException: Input tuple values do not match the required function input types

results matching ""

    No results matching ""