summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJames Raspass <jraspass@gmail.com>2022-01-22 11:07:58 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2022-01-24 00:35:51 +0000
commit17a8df707746ce70979d18c5b5f9e383c365bbff (patch)
treee5804a4a146bb23322767dca987fc9d8dbc8f493 /pp.c
parentfc23c914f8de7cb85f58830142e0164864d4601c (diff)
downloadperl-17a8df707746ce70979d18c5b5f9e383c365bbff.tar.gz
Add ceil & floor to builtin
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index 643a8758b7..b53fd87968 100644
--- a/pp.c
+++ b/pp.c
@@ -7326,6 +7326,22 @@ PP(pp_reftype)
RETURN;
}
+PP(pp_ceil)
+{
+ dSP;
+ dTARGET;
+ PUSHn(Perl_ceil(POPn));
+ RETURN;
+}
+
+PP(pp_floor)
+{
+ dSP;
+ dTARGET;
+ PUSHn(Perl_floor(POPn));
+ RETURN;
+}
+
/*
* ex: set ts=8 sts=4 sw=4 et:
*/