LibreOffice
LibreOffice 5.0 SDK C/C++ API Reference
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
rtl
math.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#ifndef INCLUDED_RTL_MATH_H
21
#define INCLUDED_RTL_MATH_H
22
23
#include <
sal/config.h
>
24
25
#include <
rtl/ustring.h
>
26
#include <
sal/saldllapi.h
>
27
#include <
sal/types.h
>
28
29
#if defined __cplusplus
30
extern
"C"
{
31
#endif
/* __cplusplus */
32
36
enum
rtl_math_StringFormat
37
{
40
rtl_math_StringFormat_E
,
41
44
rtl_math_StringFormat_F
,
45
49
rtl_math_StringFormat_G
,
50
54
rtl_math_StringFormat_Automatic
,
55
59
rtl_math_StringFormat_E1
,
60
64
rtl_math_StringFormat_E2
,
65
69
rtl_math_StringFormat_G1
,
70
74
rtl_math_StringFormat_G2
,
75
77
rtl_math_StringFormat_FORCE_EQUAL_SIZE =
SAL_MAX_ENUM
79
};
80
83
enum
rtl_math_ConversionStatus
84
{
87
rtl_math_ConversionStatus_Ok
,
88
91
rtl_math_ConversionStatus_OutOfRange
,
92
94
rtl_math_ConversionStatus_FORCE_EQUAL_SIZE =
SAL_MAX_ENUM
96
};
97
100
enum
rtl_math_RoundingMode
101
{
104
rtl_math_RoundingMode_Corrected
,
105
108
rtl_math_RoundingMode_Down
,
109
112
rtl_math_RoundingMode_Up
,
113
116
rtl_math_RoundingMode_Floor
,
117
120
rtl_math_RoundingMode_Ceiling
,
121
124
rtl_math_RoundingMode_HalfDown
,
125
128
rtl_math_RoundingMode_HalfUp
,
129
132
rtl_math_RoundingMode_HalfEven
,
133
135
rtl_math_RoundingMode_FORCE_EQUAL_SIZE =
SAL_MAX_ENUM
137
};
138
142
enum
rtl_math_DecimalPlaces
143
{
146
rtl_math_DecimalPlaces_Max
= 0x7ffffff,
147
152
rtl_math_DecimalPlaces_DefaultSignificance
=
rtl_math_DecimalPlaces_Max
153
};
154
155
220
SAL_DLLPUBLIC
void
SAL_CALL
rtl_math_doubleToString
(rtl_String ** pResult,
221
sal_Int32 * pResultCapacity,
222
sal_Int32 nResultOffset,
double
fValue,
223
enum
rtl_math_StringFormat
eFormat,
224
sal_Int32 nDecPlaces,
225
sal_Char
cDecSeparator,
226
sal_Int32
const
* pGroups,
227
sal_Char
cGroupSeparator,
228
sal_Bool
bEraseTrailingDecZeros)
229
SAL_THROW_EXTERN_C
();
230
295
SAL_DLLPUBLIC
void
SAL_CALL
rtl_math_doubleToUString
(rtl_uString ** pResult,
296
sal_Int32 * pResultCapacity,
297
sal_Int32 nResultOffset,
double
fValue,
298
enum
rtl_math_StringFormat
eFormat,
299
sal_Int32 nDecPlaces,
300
sal_Unicode
cDecSeparator,
301
sal_Int32
const
* pGroups,
302
sal_Unicode
cGroupSeparator,
303
sal_Bool
bEraseTrailingDecZeros)
304
SAL_THROW_EXTERN_C
();
305
341
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_stringToDouble
(
342
sal_Char
const
* pBegin,
sal_Char
const
* pEnd,
sal_Char
cDecSeparator,
343
sal_Char
cGroupSeparator,
enum
rtl_math_ConversionStatus
* pStatus,
344
sal_Char
const
** pParsedEnd)
SAL_THROW_EXTERN_C
();
345
381
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_uStringToDouble
(
382
sal_Unicode
const
* pBegin,
sal_Unicode
const
* pEnd,
383
sal_Unicode
cDecSeparator,
sal_Unicode
cGroupSeparator,
384
enum
rtl_math_ConversionStatus
* pStatus,
sal_Unicode
const
** pParsedEnd)
385
SAL_THROW_EXTERN_C
();
386
400
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_round
(
double
fValue,
int
nDecPlaces,
401
enum
rtl_math_RoundingMode
eMode)
402
SAL_THROW_EXTERN_C
();
403
416
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_pow10Exp
(
double
fValue,
int
nExp)
SAL_THROW_EXTERN_C
();
417
423
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_approxValue
(
double
fValue)
SAL_THROW_EXTERN_C
();
424
432
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_expm1
(
double
fValue)
SAL_THROW_EXTERN_C
();
433
441
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_log1p
(
double
fValue)
SAL_THROW_EXTERN_C
();
442
451
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_atanh
(
double
fValue)
SAL_THROW_EXTERN_C
();
452
460
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_erf
(
double
fValue)
SAL_THROW_EXTERN_C
();
461
469
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_erfc
(
double
fValue)
SAL_THROW_EXTERN_C
();
470
478
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_asinh
(
double
fValue)
SAL_THROW_EXTERN_C
();
479
487
SAL_DLLPUBLIC
double
SAL_CALL
rtl_math_acosh
(
double
fValue)
SAL_THROW_EXTERN_C
();
488
489
#if defined __cplusplus
490
}
491
#endif
/* __cplusplus */
492
493
#endif
/* INCLUDED_RTL_MATH_H */
494
495
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Generated by
1.8.4