@web-font-path: "roboto-debian.css";
Loading...
Searching...
No Matches
double.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _PICO_DOUBLE_H
8#define _PICO_DOUBLE_H
9
10#include <math.h>
11#include "pico.h"
12#include "pico/bootrom/sf_table.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
35double fix2double(int32_t m, int e);
36double ufix2double(uint32_t m, int e);
37double fix642double(int64_t m, int e);
38double ufix642double(uint64_t m, int e);
39
40// These methods round towards -Infinity.
41int32_t double2fix(double f, int e);
42uint32_t double2ufix(double f, int e);
43int64_t double2fix64(double f, int e);
44uint64_t double2ufix64(double f, int e);
45int32_t double2int(double f);
46int64_t double2int64(double f);
47
48// These methods round towards 0.
49int32_t double2int_z(double f);
50int64_t double2int64_z(double f);
51
52double exp10(double x);
53void sincos(double x, double *sinx, double *cosx);
54double powint(double x, int y);
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif