1Math::NumSeq::MultiplesU(s3e)r Contributed Perl DocumentaMtaitohn::NumSeq::Multiples(3)
2
3
4
6 Math::NumSeq::Multiples -- multiples of a given number
7
9 use Math::NumSeq::Multiples;
10 my $seq = Math::NumSeq::Multiples->new (multiples => 123);
11 my ($i, $value) = $seq->next;
12
14 A simple sequence of multiples of a given number, for example multiples
15 of 5 gives 0, 5, 10, 15, 20, etc.
16
18 See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
19 classes.
20
21 "$seq = Math::NumSeq::Multiples->new (multiples => $num)"
22 Create and return a new sequence object.
23
24 Random Access
25 "$value = $seq->ith($i)"
26 Return "$multiples * $i".
27
28 "$bool = $seq->pred($value)"
29 Return true if $value is an integer multiple of the given
30 "multiples".
31
32 "$i = $seq->value_to_i_floor($value)"
33 Return floor(value/multiples).
34
35 "$i = $seq->value_to_i_estimate($value)"
36 Return an estimate of the i corresponding to $value.
37
39 Math::NumSeq, Math::NumSeq::Modulo
40
42 <http://user42.tuxfamily.org/math-numseq/index.html>
43
45 Copyright 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2019 Kevin Ryde
46
47 Math-NumSeq is free software; you can redistribute it and/or modify it
48 under the terms of the GNU General Public License as published by the
49 Free Software Foundation; either version 3, or (at your option) any
50 later version.
51
52 Math-NumSeq is distributed in the hope that it will be useful, but
53 WITHOUT ANY WARRANTY; without even the implied warranty of
54 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
55 General Public License for more details.
56
57 You should have received a copy of the GNU General Public License along
58 with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
59
60
61
62perl v5.32.0 2020-07-28 Math::NumSeq::Multiples(3)