# Extra Math Blocks

**URL:** <https://forum.snap.berkeley.edu/t/extra-math-blocks/12220>\
**Category:** Share your Projects\
**Tags:** maths, mathematics\
**Created:** [September 16, 2022, 1:09pm UTC](https://forum.snap.berkeley.edu/t/extra-math-blocks/12220 "2022-09-16T13:09:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobmorrison](https://forum.snap.berkeley.edu/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jacobmorrison](https://forum.snap.berkeley.edu/u/jacobmorrison)\
**Post date:** [September 16, 2022, 1:09pm UTC](https://forum.snap.berkeley.edu/t/extra-math-blocks/12220/1 "2022-09-16T13:09:24Z")

</div>

I made a few blocks for extra math functions/conditionals

link: [Extra Math Blocks](https://snap.berkeley.edu/project?username=jacobmorrison&projectname=Extra%20Math%20Blocks)

Blocks:  
a **≤** b  
a **≥** b  
a **≠** b  
a min b  
a max b

UPDATE 1:

Nth Root ( \_ **√** \_ ) - The Nth Root of a number (args: n, num)

Frexp (JAVASCRIPT): From [ibm.com](http://ibm.com): " The frexp() function **breaks down the floating-point value x into a term m for the mantissa and another term n for the exponent**. It is done such that x=m\*2 n, and the absolute value of m is greater than or equal to 0.5 and less than 1.0 or equal to 0"

UPDATE 2:  
PI and Euler's Number reporter blocks  
Log function with variable base  
Floor division block

UPDATE 3:  
Atan2 function

---

<div class="post-metadata">

**Author:** ![ego-lay\_atman-bay](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/ego-lay_atman-bay/32/1395_2.png) [@ego-lay\_atman-bay](https://forum.snap.berkeley.edu/u/ego-lay_atman-bay)\
**Post date:** [September 16, 2022, 3:47pm UTC](https://forum.snap.berkeley.edu/t/extra-math-blocks/12220/2 "2022-09-16T15:47:21Z")

</div>

Good job. By the way, all of these blocks are built into snap, just right-click on any of the comparison blocks ( = \< \>), then click relable. The min/max reporters are under the math blocks relable (+ - \* /)

---

<div class="post-metadata">

**Author:** ![jacobmorrison](https://forum.snap.berkeley.edu/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jacobmorrison](https://forum.snap.berkeley.edu/u/jacobmorrison)\
**Post date:** [September 16, 2022, 8:03pm UTC](https://forum.snap.berkeley.edu/t/extra-math-blocks/12220/3 "2022-09-16T20:03:32Z")

</div>

bruh ☹

---

<div class="post-metadata">

**Author:** ![odysseus\_ssb](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/odysseus_ssb/32/17380_2.png) [@odysseus\_ssb](https://forum.snap.berkeley.edu/u/odysseus_ssb)\
**Post date:** [September 19, 2022, 4:27am UTC](https://forum.snap.berkeley.edu/t/extra-math-blocks/12220/5 "2022-09-19T04:27:02Z")

</div>

Try making a log block where you can choose the base.

---

<div class="post-metadata">

**Author:** ![jacobmorrison](https://forum.snap.berkeley.edu/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jacobmorrison](https://forum.snap.berkeley.edu/u/jacobmorrison)\
**Post date:** [September 20, 2022, 5:36pm UTC](https://forum.snap.berkeley.edu/t/extra-math-blocks/12220/6 "2022-09-20T17:36:09Z")

</div>

Ok, I took the code from [Program to compute log a to any base b (logb a) | GeeksforGeeks](https://www.geeksforgeeks.org/program-to-compute-log-a-to-any-base-b-logb-a/) and adapted it to Snap! blocks, but it still works.
