// This file is part of the SV-Benchmarks collection of verification tasks: // https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks // // SPDX-FileCopyrightText: 2001-2016 Daniel Kroening, Computer Science Department, University of Oxford // SPDX-FileCopyrightText: 2001-2016 Edmund Clarke, Computer Science Department, Carnegie Mellon University // SPDX-FileCopyrightText: 2014-2021 The SV-Benchmarks Community // // SPDX-License-Identifier: LicenseRef-BSD-4-Clause-Attribution-Kroening-Clarke extern void abort(void); extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void __assert (const char *__assertion, const char *__file, int __line) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "sine_4.c", 3, __extension__ __PRETTY_FUNCTION__); })); } extern void abort(void); void assume_abort_if_not(int cond) { if(!cond) {abort();} } extern float __VERIFIER_nondet_float(void); int main() { float IN = __VERIFIER_nondet_float(); assume_abort_if_not(IN > -1.57079632679f && IN < 1.57079632679f); float x = IN; float result = x - (x*x*x)/6.0f + (x*x*x*x*x)/120.0f + (x*x*x*x*x*x*x)/5040.0f; if(!(result <= 1.01f && result >= -1.01f)) {reach_error();} return 0; }