1a2e5f275SDavid Schultz /*-
2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause
35e53a4f9SPedro F. Giffuni *
4a2e5f275SDavid Schultz * Copyright (c) 2008 David Schultz <das@FreeBSD.ORG>
5a2e5f275SDavid Schultz * All rights reserved.
6a2e5f275SDavid Schultz *
7a2e5f275SDavid Schultz * Redistribution and use in source and binary forms, with or without
8a2e5f275SDavid Schultz * modification, are permitted provided that the following conditions
9a2e5f275SDavid Schultz * are met:
10a2e5f275SDavid Schultz * 1. Redistributions of source code must retain the above copyright
11a2e5f275SDavid Schultz * notice, this list of conditions and the following disclaimer.
12a2e5f275SDavid Schultz * 2. Redistributions in binary form must reproduce the above copyright
13a2e5f275SDavid Schultz * notice, this list of conditions and the following disclaimer in the
14a2e5f275SDavid Schultz * documentation and/or other materials provided with the distribution.
15a2e5f275SDavid Schultz *
16a2e5f275SDavid Schultz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17a2e5f275SDavid Schultz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18a2e5f275SDavid Schultz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19a2e5f275SDavid Schultz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20a2e5f275SDavid Schultz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21a2e5f275SDavid Schultz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22a2e5f275SDavid Schultz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23a2e5f275SDavid Schultz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24a2e5f275SDavid Schultz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25a2e5f275SDavid Schultz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a2e5f275SDavid Schultz * SUCH DAMAGE.
27a2e5f275SDavid Schultz */
28a2e5f275SDavid Schultz
29a2e5f275SDavid Schultz #include <math.h>
30a2e5f275SDavid Schultz
31a2e5f275SDavid Schultz long double
remainderl(long double x,long double y)32a2e5f275SDavid Schultz remainderl(long double x, long double y)
33a2e5f275SDavid Schultz {
34a2e5f275SDavid Schultz int quo;
35a2e5f275SDavid Schultz
36a2e5f275SDavid Schultz return (remquol(x, y, &quo));
37a2e5f275SDavid Schultz }
38