Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
rte_approx.h(3)			     DPDK		       rte_approx.h(3)

NAME
       rte_approx.h

SYNOPSIS
       #include	<stdint.h>

   Functions
       int rte_approx (double alpha, double d, uint32_t	*p, uint32_t *q)
       int rte_approx_64 (double alpha,	double d, uint64_t *p, uint64_t	*q)

Detailed Description
       RTE Rational Approximation

       Given a rational	number alpha with 0 < alpha < 1	and a precision	d, the
       goal is to find positive	integers p, q such that	alpha -	d < p/q	<
       alpha + d, and q	is minimal.

       Definition in file rte_approx.h.

Function Documentation
   int rte_approx (double alpha, double	d, uint32_t * p, uint32_t * q)
       Find best rational approximation

       Parameters
	   alpha Rational number to approximate
	   d Precision for the rational	approximation
	   p Pointer to	pre-allocated space where the numerator	of the
	   rational approximation will be stored when operation	is successful
	   q Pointer to	pre-allocated space where the denominator of the
	   rational approximation will be stored when operation	is successful

       Returns
	   0 upon success, error code otherwise

   int rte_approx_64 (double alpha, double d, uint64_t * p, uint64_t * q)
       Find best rational approximation	(64 bit	version)

       Parameters
	   alpha Rational number to approximate
	   d Precision for the rational	approximation
	   p Pointer to	pre-allocated space where the numerator	of the
	   rational approximation will be stored when operation	is successful
	   q Pointer to	pre-allocated space where the denominator of the
	   rational approximation will be stored when operation	is successful

       Returns
	   0 upon success, error code otherwise

Author
       Generated automatically by Doxygen for DPDK from	the source code.

Version	25.11.0			Thu Jun	11 2026		       rte_approx.h(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=rte_approx_64&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help