Changeset 516e780 in mainline for uspace/lib/c/include/float.h


Ignore:
Timestamp:
2018-08-31T11:55:41Z (6 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fa86fff
Parents:
7f7d642
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-08-31 11:55:41)
git-committer:
GitHub <noreply@…> (2018-08-31 11:55:41)
Message:

Strip down libmath. (#45)

libmath is mostly unused (except for trunc(), sin() and cos()), and most functions in it are either very imprecise or downright broken. Additionally, it is implemented in manner that conflicts with C standard. Instead of trying to fix all the shortcomings while maintaining unused functionality, I'm opting to simply remove most of it and only keep the parts that are currently necessary.

Later readdition of the removed functions is possible, but there needs to be a reliable way to evaluate their quality first.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/float.h

    r7f7d642 r516e780  
    11/*
    2  * Copyright (c) 2015 Jiri Svoboda
     2 * Copyright (c) 2018 CZ.NIC, z.s.p.o.
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libmath
    30  * @{
    31  */
    32 /** @file
    33  */
     29#ifndef _FLOAT_H
     30#define _FLOAT_H
    3431
    35 #ifndef LIBMATH_ATAN_H_
    36 #define LIBMATH_ATAN_H_
     32// FIXME: <float.h> is freestanding. Just include the compiler-provided file.
    3733
    38 #include <mathtypes.h>
     34#define FLT_MIN __FLT_MIN__
     35#define FLT_DENORM_MIN __FLT_DENORM_MIN__
     36#define FLT_EPSILON __FLT_EPSILON__
    3937
    40 extern float32_t float32_atan(float32_t);
    41 extern float64_t float64_atan(float64_t);
     38#define FLT_MANT_DIG  __FLT_MANT_DIG__
     39#define DBL_MANT_DIG  __DBL_MANT_DIG__
     40#define FLT_MAX_EXP __FLT_MAX_EXP__
     41#define DBL_MAX_EXP __DBL_MAX_EXP__
    4242
    4343#endif
    4444
    45 /** @}
    46  */
Note: See TracChangeset for help on using the changeset viewer.