Share this page

# Example: floor

This example calculates various double values.

        #include <math.h>

        double floor(double x); // Explicit forward declaration
        lr_output_message ("floor of 2.3 is %.1lf\n", floor(2.3));
        lr_output_message ("floor of 3.8 is %.1lf\n", floor(3.8));
        lr_output_message ("floor of -2.3 is %.1lf\n", floor(-2.3));
        lr_output_message ("floor of -3.8 is %.1lf\n", floor(-3.8));}

    Example: Output:
    Action.c(5): floor of 2.3 is 2.0
    Action.c(6): floor of 3.8 is 3.0
    Action.c(7): floor of -2.3 is -3.0
    Action.c(8): floor of -3.8 is -4.0

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: