1 /* 2 * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include <stdint.h> 12 13 // 14 // WebRtcSpl_SqrtFloor(...) 15 // 16 // Returns the square root of the input value |value|. The precision of this 17 // function is rounding down integer precision, i.e., sqrt(8) gives 2 as answer. 18 // If |value| is a negative number then 0 is returned. 19 // 20 // Algorithm: 21 // 22 // An iterative 4 cylce/bit routine 23 // 24 // Input: 25 // - value : Value to calculate sqrt of 26 // 27 // Return value : Result of the sqrt calculation 28 // 29 int32_t WebRtcSpl_SqrtFloor(int32_t value); 30