Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e4e666f459
4563 changed files with 1690372 additions and 0 deletions
17
examples/evaluation/eval_point.cpp
Normal file
17
examples/evaluation/eval_point.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "dpf.hpp"
|
||||
|
||||
int main(int arc, char * argv[])
|
||||
{
|
||||
uint16_t x = 42;
|
||||
auto [dpf0, dpf1] = dpf::make_dpf(x);
|
||||
|
||||
auto res = dpf::eval_point(dpf0, x);
|
||||
|
||||
std::cout << *dpf::eval_point(dpf0, 41) << " ^ " << *dpf::eval_point(dpf1, 41) << " = " << (*dpf::eval_point(dpf0, 41) ^ *dpf::eval_point(dpf1, 41)) << "\n"; // = 0
|
||||
std::cout << *dpf::eval_point(dpf0, x) << " ^ " << *dpf::eval_point(dpf1, x) << " = " << (*dpf::eval_point(dpf0, x) ^ *dpf::eval_point(dpf1, x)) << "\n"; // = 1
|
||||
std::cout << *dpf::eval_point(dpf0, 43) << " ^ " << *dpf::eval_point(dpf1, 43) << " = " << (*dpf::eval_point(dpf0, 43) ^ *dpf::eval_point(dpf1, 43)) << "\n"; // = 0
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue