repo: https://github.com/u-boot/u-boot commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91 Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
21 lines
639 B
C
21 lines
639 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* rational fractions
|
|
*
|
|
* Copyright (C) 2009 emlix GmbH, Oskar Schirmer <oskar@scara.com>
|
|
*
|
|
* helper functions when coping with rational numbers,
|
|
* e.g. when calculating optimum numerator/denominator pairs for
|
|
* pll configuration taking into account restricted register size
|
|
*/
|
|
|
|
#ifndef _LINUX_RATIONAL_H
|
|
#define _LINUX_RATIONAL_H
|
|
|
|
void rational_best_approximation(
|
|
unsigned long given_numerator, unsigned long given_denominator,
|
|
unsigned long max_numerator, unsigned long max_denominator,
|
|
unsigned long *best_numerator, unsigned long *best_denominator);
|
|
|
|
#endif /* _LINUX_RATIONAL_H */
|