You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
741 B
34 lines
741 B
6 years ago
|
/*
|
||
|
* Copyright (c) 2019-present, Facebook, Inc.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
class CantHandle {
|
||
|
|
||
|
// Let's collect examples that we know we can't handle
|
||
|
|
||
|
// Intervals are limited to affine expressions, not
|
||
|
// polynomials. Hence, we can't handle the below examples.
|
||
|
|
||
|
// Expected: square root(x), got T
|
||
|
void square_root_FP(int x) {
|
||
|
int i = 0;
|
||
|
while (i * i < x) {
|
||
|
i++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Expected: square root(x), got T
|
||
|
void square_root_variant_FP(int x) {
|
||
|
int i = 0;
|
||
|
while (i < x / i) {
|
||
|
i++;
|
||
|
}
|
||
|
}
|
||
|
// Expected: x^2, got T
|
||
|
void quadratic_FP(int x) {
|
||
|
for (int i = 0; i < x * x; i++) {}
|
||
|
}
|
||
|
}
|