From 0f902b95cfd3236bb72362a6f6c328af8793c007 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 3 Feb 2021 12:45:10 -0800 Subject: [PATCH] Clarify when factor() builtin returns 1 Clarify that the factor() builtin return 1 if it does not find a factor below the limit. --- help/factor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/help/factor b/help/factor index 8e82267..2bbcb80 100644 --- a/help/factor +++ b/help/factor @@ -16,7 +16,8 @@ DESCRIPTION assume n and limit are both nonnegative. If n has a prime proper factor less than or equal to limit, then - factor(n, limit) returns the smallest such factor. + factor(n, limit) returns the smallest such factor, or 1 if no + factor was found below the limit. NOTE: A proper factor of n>1 is a factor < n. In other words, for n>1 is not a proper factor of itself. The value 1 @@ -50,7 +51,7 @@ SEE ALSO isprime, lfactor, nextcand, nextprime, prevcand, prevprime, pfact, pix, ptest -## Copyright (C) 1999-2006 Landon Curt Noll +## Copyright (C) 1999-2006,2021 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License