frem - Maple Help

frem

return the floating-point remainder

 Calling Sequence frem(x, y)

Parameters

 x - extended_numeric or complex y - extended_numeric or complex

Description

 • The frem(x, y) function returns r = x - y*n where n is the integer nearest the exact value x/y. The value of n is taken to be even in the case of a tie.
 • The rounding mode is not considered for this computation. If r = 0, then its sign is set to that of x.
 • If y is real, frem(x, y) maps onto complex numerics.
 • This function signals invalid_operation if y is unordered with 0 (unless y is already a NaN).
 Note:  If m and n are integers, frem(m, n) is not necessarily the same mathematical value as irem(m, n), since frem() computes by using the nearest integer to the quotient m/n, not the integer quotient of m by n.

 • The frem command is thread-safe as of Maple 15.
 > $\mathrm{frem}\left(2.2,3\right)$
 ${-0.8}$ (1)
 > $\mathrm{frem}\left(-2.2,3\right)$
 ${0.8}$ (2)
 > $\mathrm{frem}\left(2,3\right)$
 ${-1.}$ (3)
 > $\mathrm{irem}\left(2,3\right)$
 ${2}$ (4)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 8, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9545466303825378, "perplexity": 3653.456333065941}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964360803.0/warc/CC-MAIN-20211201113241-20211201143241-00397.warc.gz"}