3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 18:05:21 +00:00
z3/lib/luby.h
Leonardo de Moura e9eab22e5c Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 11:35:25 -07:00

32 lines
499 B
C

/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
luby.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-03-04.
Revision History:
--*/
#ifndef _LUBY_H_
#define _LUBY_H_
/**
\brief Return the i-th element of the Luby sequence: 1,1,2,1,1,2,4,1,1,2,1,1,2,4,8,...
get_luby(i) = 2^{i-1} if i = 2^k -1
get_luby(i) = get_luby(i - 2^{k-1} + 1) if 2^{k-1} <= i < 2^k - 1
*/
unsigned get_luby(unsigned i);
#endif /* _LUBY_H_ */