# 4 simple & small math functions

## Recommended Posts

Included example..

```// Returns the opposite number of i. (-9999 to 9999 OR 9999 to -9999 [- <=> +])
function Opposite(i: Integer): Integer;
begin
Result := (i * -1);
end;

// Returns the negative number of i. (-9999 to -9999 OR 9999 to -9999 [+/- => -])
function Negative(i: Integer): Integer;
begin
Result := (IAbs(i) * -1);
end;

// Returns the opposite number of e. (-999.9 to 999.9 OR 999.9 to -999.9 [- <=> +])
function OppositeE(e: Extended): Extended;
begin
Result := (e * -1);
end;

// Returns the negative number of e. (-999.9 to -999.9 OR 999.9 to -999.9 [+/- => -])
function NegativeE(e: Extended): Extended;
begin
Result := (Abs(e) * -1);
end;

begin
WriteLn('Opposite "-999": ' + IntToStr(Opposite(-999)));
WriteLn('Negative "999": ' + IntToStr(Negative(999)));
WriteLn('Opposite "999": ' + IntToStr(Opposite(999)));
WriteLn('Negative "-999": ' + IntToStr(Negative(-999)));
WriteLn('');
WriteLn('OppositeE "-999.99": ' + FloatToStr(OppositeE(-999.99)));
WriteLn('NegativeE "999.99": ' + FloatToStr(NegativeE(999.99)));
WriteLn('OppositeE "999.99": ' + FloatToStr(OppositeE(999.99)));
WriteLn('NegativeE "-999.99": ' + FloatToStr(NegativeE(-999.99)));
end.```

nice

##### Share on other sites

haha nice math works:)

##### Share on other sites

0.010854 bitcoin 0.00469823 bitcoin in naira add bitcoin excel crypto storj how to buy bitcoin debit card in oklahoma city 0.36 bitcoins in euro 10th/s bitcoin miner bitcoin buyer zkuЕЎenosti buy bitcoin samsung pay algorithm behind bitcoin buy bitcoin ethereum and litecoin on yahoo finance humane ai pin release date 0.00156977 bitcoin to usd 17 year old bitcoin scam 1 year chart of bitcoin

capital one shopping account aapt crypto bitcoin to buy now crypto money prices best site to buy bitcoin in spain advcash bitcoin debit card crypto tax filing ross ulbricht twitter buying bitcoin with stolen credit card singularitynet crypto

pay4me crypto 10 top crypto brokers most profitable coins to mine 1 bitcoin cost 2009 buy bitcoins europe 1 satoshi how many bitcoin best crypto wallet on android ada coin market cap dogelon mars coin price velodrome app

can webull buy bitcoin can you buy bitcoin with fiat on binance where can i buy xdc aavalanche crypto omni crypto amazon token crypto ai app for crypto ido good crypto to invest in crypto bull run prediction

what is crypto signal is luxalgo worth it 2025 prediction apps to stake crypto 3000 bitcoin

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×