| 1 | /*
|
|---|
| 2 | * Copyright (c) 2011 Petr Koupy
|
|---|
| 3 | * All rights reserved.
|
|---|
| 4 | *
|
|---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
|---|
| 6 | * modification, are permitted provided that the following conditions
|
|---|
| 7 | * are met:
|
|---|
| 8 | *
|
|---|
| 9 | * - Redistributions of source code must retain the above copyright
|
|---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
|---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
|---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
|---|
| 13 | * documentation and/or other materials provided with the distribution.
|
|---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
|---|
| 15 | * derived from this software without specific prior written permission.
|
|---|
| 16 | *
|
|---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|---|
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|---|
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|---|
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|---|
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|---|
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|---|
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|---|
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 27 | */
|
|---|
| 28 |
|
|---|
| 29 | /** @addtogroup libposix
|
|---|
| 30 | * @{
|
|---|
| 31 | */
|
|---|
| 32 | /** @file Mathematical operations.
|
|---|
| 33 | */
|
|---|
| 34 |
|
|---|
| 35 | #define LIBPOSIX_INTERNAL
|
|---|
| 36 |
|
|---|
| 37 | #include "internal/common.h"
|
|---|
| 38 | #include "posix/math.h"
|
|---|
| 39 |
|
|---|
| 40 | /**
|
|---|
| 41 | *
|
|---|
| 42 | * @param x
|
|---|
| 43 | * @param exp
|
|---|
| 44 | * @return
|
|---|
| 45 | */
|
|---|
| 46 | double posix_ldexp(double x, int exp)
|
|---|
| 47 | {
|
|---|
| 48 | // TODO: low priority, just a compile-time dependency of binutils
|
|---|
| 49 | not_implemented();
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | /**
|
|---|
| 53 | *
|
|---|
| 54 | * @param num
|
|---|
| 55 | * @param exp
|
|---|
| 56 | * @return
|
|---|
| 57 | */
|
|---|
| 58 | double posix_frexp(double num, int *exp)
|
|---|
| 59 | {
|
|---|
| 60 | // TODO: low priority, just a compile-time dependency of binutils
|
|---|
| 61 | not_implemented();
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | /**
|
|---|
| 65 | *
|
|---|
| 66 | * @param x
|
|---|
| 67 | * @return
|
|---|
| 68 | */
|
|---|
| 69 | double posix_cos(double x)
|
|---|
| 70 | {
|
|---|
| 71 | // TODO: Python dependency
|
|---|
| 72 | not_implemented();
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | /**
|
|---|
| 76 | *
|
|---|
| 77 | * @param x
|
|---|
| 78 | * @param y
|
|---|
| 79 | * @return
|
|---|
| 80 | */
|
|---|
| 81 | double posix_pow(double x, double y)
|
|---|
| 82 | {
|
|---|
| 83 | // TODO: Python dependency
|
|---|
| 84 | not_implemented();
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | /**
|
|---|
| 88 | *
|
|---|
| 89 | * @param x
|
|---|
| 90 | * @return
|
|---|
| 91 | */
|
|---|
| 92 | double posix_floor(double x)
|
|---|
| 93 | {
|
|---|
| 94 | // TODO: Python dependency
|
|---|
| 95 | not_implemented();
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | /**
|
|---|
| 99 | *
|
|---|
| 100 | * @param x
|
|---|
| 101 | * @return
|
|---|
| 102 | */
|
|---|
| 103 | double posix_fabs(double x)
|
|---|
| 104 | {
|
|---|
| 105 | // TODO: Python dependency
|
|---|
| 106 | not_implemented();
|
|---|
| 107 | }
|
|---|
| 108 |
|
|---|
| 109 | /**
|
|---|
| 110 | *
|
|---|
| 111 | * @param x
|
|---|
| 112 | * @param iptr
|
|---|
| 113 | * @return
|
|---|
| 114 | */
|
|---|
| 115 | double posix_modf(double x, double *iptr)
|
|---|
| 116 | {
|
|---|
| 117 | // TODO: Python dependency
|
|---|
| 118 | not_implemented();
|
|---|
| 119 | }
|
|---|
| 120 |
|
|---|
| 121 | /**
|
|---|
| 122 | *
|
|---|
| 123 | * @param x
|
|---|
| 124 | * @param y
|
|---|
| 125 | * @return
|
|---|
| 126 | */
|
|---|
| 127 | double posix_fmod(double x, double y)
|
|---|
| 128 | {
|
|---|
| 129 | // TODO: Python dependency
|
|---|
| 130 | not_implemented();
|
|---|
| 131 | }
|
|---|
| 132 |
|
|---|
| 133 | /**
|
|---|
| 134 | *
|
|---|
| 135 | * @param x
|
|---|
| 136 | * @return
|
|---|
| 137 | */
|
|---|
| 138 | double posix_log(double x)
|
|---|
| 139 | {
|
|---|
| 140 | // TODO: Python dependency
|
|---|
| 141 | not_implemented();
|
|---|
| 142 | }
|
|---|
| 143 |
|
|---|
| 144 | /**
|
|---|
| 145 | *
|
|---|
| 146 | * @param x
|
|---|
| 147 | * @param y
|
|---|
| 148 | * @return
|
|---|
| 149 | */
|
|---|
| 150 | double posix_atan2(double y, double x)
|
|---|
| 151 | {
|
|---|
| 152 | // TODO: Python dependency
|
|---|
| 153 | not_implemented();
|
|---|
| 154 | }
|
|---|
| 155 |
|
|---|
| 156 | /**
|
|---|
| 157 | *
|
|---|
| 158 | * @param x
|
|---|
| 159 | * @return
|
|---|
| 160 | */
|
|---|
| 161 | double posix_sin(double x)
|
|---|
| 162 | {
|
|---|
| 163 | // TODO: Python dependency
|
|---|
| 164 | not_implemented();
|
|---|
| 165 | }
|
|---|
| 166 |
|
|---|
| 167 | /**
|
|---|
| 168 | *
|
|---|
| 169 | * @param x
|
|---|
| 170 | * @return
|
|---|
| 171 | */
|
|---|
| 172 | double posix_exp(double x)
|
|---|
| 173 | {
|
|---|
| 174 | // TODO: Python dependency
|
|---|
| 175 | not_implemented();
|
|---|
| 176 | }
|
|---|
| 177 |
|
|---|
| 178 | /**
|
|---|
| 179 | *
|
|---|
| 180 | * @param x
|
|---|
| 181 | * @return
|
|---|
| 182 | */
|
|---|
| 183 | double posix_sqrt(double x)
|
|---|
| 184 | {
|
|---|
| 185 | // TODO: Python dependency
|
|---|
| 186 | not_implemented();
|
|---|
| 187 | }
|
|---|
| 188 |
|
|---|
| 189 | /** @}
|
|---|
| 190 | */
|
|---|