Wiki Navigation
Function Library

Math Functions

Toolbox functions. Step functions, absolute values, and discontinuous logic.

Math & Utility Functions

These functions are fundamental building blocks in programming and mathematics. They often introduce sharp corners or jumps (discontinuities) into the graph.

The Step Family

These functions "snap" values to integers, creating a staircase-like graph.

1. Floor (x\lfloor x \rfloor) & Ceil (x\lceil x \rceil)

  • Floor (floor(x)): Rounds down to the nearest integer.
    • Graph looks like a staircase going up.
    • Steps are "closed" on the left, "open" on the right.
  • Ceil (ceil(x)): Rounds up to the nearest integer.
    • Similar staircase, but shifts values up.
f(x) = floor(x)
Scroll to zoom • Drag to pan

2. Round (round(x))

  • Rounds to the nearest integer.
  • The "jump" happens at x.5x.5 (e.g., at 0.5, 1.5, 2.5).

3. Sign (sign(x) or sgn(x))

  • Extracts the sign of the number.
    • +1+1 if x>0x > 0
    • 1-1 if x<0x < 0
    • 00 if x=0x = 0
  • Shape: Two horizontal lines with a gap at 0. Looks like a disconnected "step".

Continuous Utilities

1. Absolute Value (x|x|)

f(x)=xf(x) = |x|

  • Shape: A sharp "V" shape touching the origin.
  • Usage: Usually composed with other functions. e.g., sin(x)|\sin(x)| creates a bouncing wave (all mountains, no valleys).
f(x) = abs(x)
Scroll to zoom • Drag to pan

🧠 Advanced Guessing Strategies

Strategy 1: Spotting the "Jump"

If you see a vertical gap in the line where the function instantly changes value:

  • It is a Discontinuity.
  • If the segments are flat (slope 0), it's likely floor, ceil, or round.
  • Check exactly where the jump happens:
    • Jump at integer (x=1,2,x=1, 2, \dots)? \to Floor/Ceil.
    • Jump at half-integer (x=0.5,1.5,x=0.5, 1.5, \dots)? \to Round.

Strategy 2: Sharp Turns

If the graph has a sharp corner (not smooth):

  • It involves an Absolute Value or a Max/Min function.
  • The most common is the V-shape of x|x|.

Strategy 3: The "On/Off" Switch

Sometimes sign(x) is used to turn parts of a function on or off.

  • xsign(x)x \cdot \text{sign}(x) is actually just x|x|.
  • 12(1+sign(x))\frac{1}{2}(1 + \text{sign}(x)) is the Heaviside Step Function (0 for negative xx, 1 for positive xx).
Function Guessr Wiki