function ge
ge():
boolean
| boolean[]
| boolean[][]

Greater than or equal comparison X >= Y.

Compares two inputs element-wise, returning true where elements in X are greater than or equal to corresponding elements in Y.

Examples

Comparison between two numbers

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge(5, 5), true);

Comparison between a number and an array

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge(5, [5, 6, 3]), [true, false, true]);

Comparison between a number and a matrix

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge(5, [[5, 6], [3, 5]]), [[true, false], [true, true]]);

Comparison between an array and a number

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge([5, 6, 3], 5), [true, true, false]);

Comparison between a matrix and a number

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge([[5, 6], [3, 5]], 5), [[true, true], [false, true]]);

Comparison between two arrays

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge([5, 6, 3], [2, 6, 0]), [true, true, true]);

Comparison between two matrices

import { assertEquals } from "jsr:@std/assert";

assertEquals(ge([[5, 6], [-1, 2]], [[5, 6], [3, 5]]), [[true, true], [false, false]]);

Parameters

First operand for comparison

Second operand for comparison

Return Type

boolean
| boolean[]
| boolean[][]

The result of the comparison

Throws

If the input dimensions do not agree or if no arguments are provided