Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the "to the power of" symbol in objective-c

Tags:

For the program I am making, I need the to power of symbol, but when I try to use the general symbol (^), it doesn't recognize that?

Could anyone tell me what symbol to use instead?

like image 387
user1930931 Avatar asked Dec 28 '12 00:12

user1930931


People also ask

What does the symbol mean in Objective C?

That symbol is used to declare block. For more information read here Blocks Programming Topics. Some more info: Block objects are a C-level syntactic and runtime feature.

What is pow function C?

C pow() The pow() function computes the power of a number. The pow() function takes two arguments (base value and power value) and, returns the power raised to the base number. For example, [Mathematics] xy = pow(x, y) [In programming] The pow() function is defined in math.


1 Answers

there is no pow symbol. use the C function pow(x,y);

double res = pow(5.0,2.0); //25   

BSD Library Functions Manual

NAME: pow -- power function

SYNOPSIS:

 #include <math.h>   double pow(double x, double y); 
like image 68
Daij-Djan Avatar answered Sep 22 '22 07:09

Daij-Djan