@@ -0,0 +1,550 @@
+%22%22%22%0ASignum function -- https://en.wikipedia.org/wiki/Sign_function%0A%22%22%22%0A%0A%0Adef signum(num: float) -%3E int:%0A    %22%22%22%0A    Applies signum function on the number%0A%0A    %3E%3E%3E signum(-10)%0A    -1%0A    %3E%3E%3E signum(10)%0A    1%0A    %3E%3E%3E signum(0)%0A    0%0A    %22%22%22%0A    if num %3C 0:%0A        return -1%0A    return 1 if num else 0%0A%0A%0Adef test_signum() -%3E None:%0A    %22%22%22%0A    Tests the signum function%0A    %22%22%22%0A    assert signum(5) == 1%0A    assert signum(-5) == -1%0A    assert signum(0) == 0%0A%0A%0Aif __name__ == %22__main__%22:%0A    print(signum(12))%0A    print(signum(-12))%0A    print(signum(0))%0A

Add signum function (#7526)