EnglishFrenchSpanish

OnWorks favicon

ev - Online in the Cloud

Run ev in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command ev that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


ev - evaluate expressions

SYNOPSIS


ev 'expr' ..

DESCRIPTION


Ev evaluates expressions given on the command line, and sends the results to the standard
output, one per line. An expression contains real numbers, function calls, and the
following operators:

+ - * / ^

Operators are evaluated left to right, except '^', which is right associative. Powers
have the highest precedence; multiplication and division are evaluated before addition and
subtraction. Expressions can be grouped with parentheses. All values are double
precision real.

The following library of functions is available:

if(cond, then, else)
if cond is greater than zero, then is evaluated, otherwise else is evaluated.

select(N, a1, a2, ..)
return aN (N is rounded to the nearest integer). If N is zero, the number of
available arguments is returned.

rand(x) compute a random number between 0 and 1 based on x.

floor(x) return largest integer not greater than x.

ceil(x) return smallest integer not less than x.

sqrt(x) return square root of x.

exp(x) compute e to the power of x (e approx = 2.718281828).

log(x) compute the logarithm of x to the base e.

log10(x) compute the logarithm of x to the base 10.

sin(x), cos(x), tan(x)
trigonometric functions.

asin(x), acos(x), atan(x)
inverse trigonometric functions.

atan2(y, x)
inverse tangent of y/x (range -pi to pi).

EXAMPLE


To pass the square root of two and the sine of .5 to a program:

program `ev 'sqrt(2)' 'sin(.5)'`

Use ev online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    oStorybook
    oStorybook
    oStorybook l'outil privil�gi� des
    �crivains. ATTENTION : voir sur
    http://ostorybook.tuxfamily.org/v5/
    --en_EN oStorybook the right tool for
    writers. WARNIN...
    Download oStorybook
  • 2
    Asuswrt-Merlin
    Asuswrt-Merlin
    Asuswrt-Merlin is a third party
    firmware for select Asus wireless
    routers. Based on the Asuswrt firmware
    developed by Asus, it brings tweaks, new
    features and ...
    Download Asuswrt-Merlin
  • 3
    Atom
    Atom
    Atom is a text editor that's
    modern, approachable and full-featured.
    It's also easily customizable- you
    can customize it to do anything and be
    able to ...
    Download Atom
  • 4
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 5
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 6
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • More »

Linux commands

Ad