17cafeaa1SWarner Losh /*- 2*f86e6000SWarner Losh * Copyright (c) 2018 M. Warner Losh <imp@FreeBSD.org> 37cafeaa1SWarner Losh * 47cafeaa1SWarner Losh * Redistribution and use in source and binary forms, with or without 57cafeaa1SWarner Losh * modification, are permitted provided that the following conditions 67cafeaa1SWarner Losh * are met: 77cafeaa1SWarner Losh * 1. Redistributions of source code must retain the above copyright 87cafeaa1SWarner Losh * notice, this list of conditions and the following disclaimer. 97cafeaa1SWarner Losh * 2. Redistributions in binary form must reproduce the above copyright 107cafeaa1SWarner Losh * notice, this list of conditions and the following disclaimer in the 117cafeaa1SWarner Losh * documentation and/or other materials provided with the distribution. 127cafeaa1SWarner Losh * 137cafeaa1SWarner Losh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 147cafeaa1SWarner Losh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 157cafeaa1SWarner Losh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 167cafeaa1SWarner Losh * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 177cafeaa1SWarner Losh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 187cafeaa1SWarner Losh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 197cafeaa1SWarner Losh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 207cafeaa1SWarner Losh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 217cafeaa1SWarner Losh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 227cafeaa1SWarner Losh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 237cafeaa1SWarner Losh * SUCH DAMAGE. 247cafeaa1SWarner Losh */ 257cafeaa1SWarner Losh 267cafeaa1SWarner Losh /* 277cafeaa1SWarner Losh * A replacement for math.h that's sufficient to pretend that we 287cafeaa1SWarner Losh * actually have one to keep the un-modified lua happy. 297cafeaa1SWarner Losh */ 307cafeaa1SWarner Losh #include <stdint.h> 317cafeaa1SWarner Losh 327cafeaa1SWarner Losh int64_t lstd_pow(int64_t x, int64_t y); 337cafeaa1SWarner Losh int64_t lstd_floor(int64_t); 347cafeaa1SWarner Losh int64_t lstd_fmod(int64_t a, int64_t b); 357cafeaa1SWarner Losh int64_t lstd_frexp(int64_t a, int *); 36