CheckFirst
  • CheckFirst
  • Get started
    • Tutorials
      • Yes/No
      • Quiz
      • Constants table
      • Date calculator
      • Complex example
    • Logic Syntax
  • Features
    • Questions
    • Constants
    • Logic
      • Calculator logic
      • Conditional logic
      • Date logic
      • Map constant
      • Results formatting
    • Settings
  • FAQ
    • Full Logic Syntax List
  • Contact Us
  • Updates
Powered by GitBook
On this page

Was this helpful?

  1. Get started

Logic Syntax

This is a short list of the most commonly used functions.

PreviousComplex exampleNextQuestions

Last updated 3 years ago

Was this helpful?

These functions can be used in any logic field in CheckFirst.

Functions marked with * are also available in an .

Function name

Description

Function

Example

*Add

Add two or more values, x + y.

add(N1,N2)

*Subtract

Subtract two values, x - y.

subtract(N1,N2)

*Multiply

Multiply two or more values, x * y.

multiply(N1,N2)

*Divide

Divide two values, x / y.

divide(N1,2)

*Power

Calculates the power of x to y, x ^ y.

pow(N1,2)

*Square

Compute the square of a value, x * x.

square(N1)

Square root

Calculate the square root of a value.

sqrt(N1)

Round

Round a value towards the nearest integer.

round(N1,2)

Round - Floor

Round a value towards minus infinity.

floor(N1)

Round - Ceiling

Round a value towards plus infinity. If x is complex, both real and imaginary parts are rounded towards plus infinity.

ceil(N1)

Max

Compute the maximum value of a matrix or a list with values.

max(N1,N2,N3)

Min

Compute the minimum value of a matrix or a list of values.

min(N1,N2,N3)

Mean

Compute the mean value of matrix or a list with values.

mean(N1,N2,N3)

Median

Compute the median of a matrix or a list with values.

median(N1,N2,N3)

Mode

Computes the mode of a set of numbers or a list with values(numbers or characters).

mode(N1,N2,N3)

Standard deviation

Compute the standard deviation of a matrix or a list with values.

std(N1,N2,N3)

Sum

Compute the sum of a matrix or a list with values.

sum(N1,N2,N3)

If/Else

Executes an action if a condition is met (true) and another action if that condition is not met (false).

ifelse(conditions,then,else...)

ifelse((O1>1) and (O2>1),true,false)

ifelse(O1>

Count if

Count the number of elements that fulfil a condition.

countif([Range],condition)

countif([O1,O2,O3], "Correct")

Round

Round a number x to n decimal place

round(x,n)

round(O2,3)

round the numeric output of logic O2 to 3 decimal places.

accepted by CheckFirst

View the full logic syntax list
add(x, y)
subtract(x, y)
multiply(x, y)
divide(x, y)
pow(x, y)
square(x)
sqrt(x)
round(x,n)
floor(x)
ceil(x)
max(a, b, c, …)
min(a, b, c, …)
mean(a, b, c, …)
median(a, b, c, …)
mode(a, b, c, …)
std(a, b, c, …)
sum(a, b, c, …)
operator format