Files
OpenCellular/core/nds32/include/math.h
Dino Li 6de8d02fa8 nds32: Add fabsf and sqrtf function
The magnetometer online calibration requires these two
functions and taken from newlib.

Signed-off-by: Dino Li <dino.li@ite.com.tw>

BRANCH=none
BUG=none
TEST=fabsf():
fabsf(1.23) = 1.23
fabsf(-1.23) = 1.23

sqrtf():
sqrtf(4.56) = 2.135
sqrtf(0.123) = 0.350
sqrtf(-0.123) = an exception is triggered.

Change-Id: I808ca7f1bd03c6d6c1b32861ede4ecbfeeaa3da6
Reviewed-on: https://chromium-review.googlesource.com/429730
Commit-Ready: Dino Li <Dino.Li@ite.com.tw>
Tested-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2017-01-18 22:50:54 -08:00

15 lines
337 B
C

/* Copyright 2017 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Math utility functions for N8 */
#ifndef __CROS_EC_MATH_H
#define __CROS_EC_MATH_H
float sqrtf(float x);
float fabsf(float x);
#endif /* __CROS_EC_MATH_H */