# What does the vertical pipe slash operator do?

I'm wondering what pipe slash `|/` does in,

``````SET equal_area_radius = |/area/pi();
``````

The statement works and it definitely changes the value:

``````SELECT |/125.555/pi(); --  returns: 6.32181918120139
SELECT 125.555/pi();   --  returns: 39.9653977598058
``````

What does the pipe-slash operator `|/` do?

## 1 Answer

The `|/` operator calculates the square root

``````postgres>  select |/16,  sqrt(16);
?column? | sqrt
----------+------
4 |    4
(1 row)
``````

So `|/125.555/pi()` is equivalent to `sqrt(125.555/pi())`

• Sure enough--looked at the site where I copied the statement from and they had this: i.imgur.com/5twDykK.png I should have worked that one out. Thanks! Jan 9, 2019 at 13:41
• @a_horse funny that the `|/` operator has lower precedence than `/` an `*`. Jan 9, 2019 at 15:01
• it makes sense. in math, the radical symbol, which `|/` is supposed to suggest, is often used with a long expression underneath it. this would only work if `|/` has low precedence. Jan 17, 2019 at 4:09