PHP Tutorial #17 Mathematical Methods (Abs, Acos , Acosh and Asin )

Image Source

Repository

https://github.com/php/php-src  

What Will I Learn?

I will learn the mathematical methods , we will take the " Abs, Acos , Acosh and Asin " methods.     

  • How to get the absolute value using Abs method.
  • What's the Acos method and how to use it.
  • The concept of the Acosh method and its uses.
  • How to get the arc sin of a value using Asin method.

Requirements

  • Server support PHP , Xampp or Wamp for example
  • An IDE like Sublime text.
  • Browser (Chrome for example) 

Difficulty

  • Basic

Description

1- Abs method  

This function returns the absolute value of a natural, integer or real number. Thus, it will remove the sign from the specified number so that when it is a negative number, it eliminates the minus sign "-" before the number.  

It is therefore impossible to get a negative number with this function, they will always be positive, it is therefore a very useful function to keep the "natural"  part of a number. 

It has the expression as parameter ,this parameter is used to specify an expression representing a number to process. 

It return a number greater than 0 these values are the only ones that can be returned. The absolute value of a number is always positive.  

To use the abs method you need to pass the number as parameter

abs($number)

I have a negative number and I want to get the positive of this number using the abs method

$number = -25;

echo abs($number);

The abs method will return the positive number , it will eliminate the minus sign (-) , and this is the result

2- Acos method  

This function returns the cosine arc of number . The acos is the inverse function of cos (), which means that a == cos (acos (a)) for any value in the validity range of acos (). 

It has The argument to be treated and it returns the arc cosine of the argument, in radians.  

To use the acos method you need to pass the argument as parameter

acos($argument)

The validity range is [-1,1], I will pass the number 0 to this method and this is the result

echo acos(0);

3- Acosh Method

This function returns the hyperbolic cosine arc of an argument.  It has the expression as parameter , This parameter is used to specify the expression containing the number to be processed.

To use the acosh method you must pass the argument as parameter

acosh(argument)

The validity range is [-1,+inf[, I will pass the number 3 to this method and this is the result

echo acosh(3);

4- Asin Method

This trigonometric function makes it possible to return the sine arc. It has the expression as parameter this parameter is used to indicate the expression containing the number to be processed. 

The value of the parameter must be in a range between -1 and 1, otherwise the function will consider that domain error has occurred. 

It returns -π / 2 to π / 2 these values are used to indicate the radians of the sine arc.  

To use the asin method you need to pass a number between -1 and 1

asin($number)

I will pass the number 0 to the asin method and this is the result

Video Tutorial 

Curriculum

Proof of Work Done

https://github.com/alexendre-maxim/PHP-Tutorial/blob/master/string7.php

Sort:  

Hi @alexendre-maxim

Thank you for your contribution to the video tutorial category.

As mentioned in the last post, it would be good to go beyond the basic level and try to cover concepts that are more in-depth requiring tutorial.

You can take a look at tensor's tutorials to get an idea of how you can go into deeper concepts.

https://steemit.com/utopian-io/@tensor/a-beginners-guide-to-dart---control-flow-and-low-level-compilation---part-two

Even though this is a beginners tutorial but the concepts taught do carry some depth that requires step by step teaching.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @rosatravels! Keep up the good work!

Congratulations @alexendre-maxim! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 100 upvotes. Your next target is to reach 200 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Support SteemitBoard's project! Vote for its witness and get one more award!

Hi @alexendre-maxim!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @alexendre-maxim!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 60695.64
ETH 2900.11
USDT 1.00
SBD 3.53