7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE reference |
10 <!DOCTYPE reference |
11 PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd"> |
12 <reference id="GUID-9A38894D-98B8-5AFA-A36A-AC8B494EC2CC" xml:lang="en"><title>libmexample: |
12 <reference id="GUID-9A38894D-98B8-5AFA-A36A-AC8B494EC2CC" xml:lang="en"><title>libmexample: Using the Standard C Math Library</title><shortdesc>This example demonstrates the use of math functions, such |
13 Using the Standard C Math Library</title><shortdesc>This example demonstrates the use of math functions, such as <codeph>gamma(double)</codeph>, |
13 as <codeph>gamma(double)</codeph>, that are part of the Standard C |
14 that are part of the Standard C Maths support library (<codeph>libm.dll</codeph>). </shortdesc><prolog><metadata><keywords/></metadata></prolog><refbody> |
14 Maths support library (<codeph>libm.dll</codeph>). </shortdesc><prolog><metadata><keywords/></metadata></prolog><refbody> |
15 <section id="GUID-D3589080-5DD4-5DDF-A269-A7D1687F4705"><title>Purpose</title> <p>This |
15 <section id="GUID-D3589080-5DD4-5DDF-A269-A7D1687F4705"><title>Purpose</title> <p>This example application shows how to use the <filepath>libm.dll</filepath> library. It: </p> <ol id="GUID-BDAA52E1-6D3C-520C-9C3F-74A558955A86"> |
16 example application shows how to use the <filepath>libm.dll</filepath> library. |
16 <li id="GUID-85A5E6A3-19BD-5060-A92E-CFAA7E522DF4"><p>reads an input |
17 It: </p> <ol id="GUID-BDAA52E1-6D3C-520C-9C3F-74A558955A86"> |
17 value supplied by the user </p> </li> |
18 <li id="GUID-85A5E6A3-19BD-5060-A92E-CFAA7E522DF4"><p>reads an input value |
18 <li id="GUID-7D292EC7-FE00-5E35-9261-C11CB406CF32"><p>applies the |
19 supplied by the user </p> </li> |
19 gamma function on the input value </p> </li> |
20 <li id="GUID-7D292EC7-FE00-5E35-9261-C11CB406CF32"><p>applies the gamma function |
|
21 on the input value </p> </li> |
|
22 <li id="GUID-B1C92272-17F9-5520-AC5D-A55B0C11963C"><p>prints the output. </p> </li> |
20 <li id="GUID-B1C92272-17F9-5520-AC5D-A55B0C11963C"><p>prints the output. </p> </li> |
23 </ol> </section> |
21 </ol> </section> |
24 <section id="GUID-2638D79E-A3D2-5A08-AFC3-00AF68C3C194-GENID-1-8-1-11-1-1-5-1-3-1-11-1-8-1-3-2"><title>Download</title> <p>Click |
22 <section id="GUID-2638D79E-A3D2-5A08-AFC3-00AF68C3C194-GENID-1-10-1-11-1-1-5-1-3-1-11-1-8-1-3-2"><title>Download</title> <p>Click on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.zip" scope="external"> libmexample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.html" scope="peer">browse</xref> to view the example code. </p> </section> |
25 on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.zip" scope="external"> libmexample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.html" scope="peer">browse</xref> to view the example code. </p> </section> |
23 <section id="GUID-C3619B7E-3AF5-58D1-99D1-45CADE74B54C"><title>Class |
26 <section id="GUID-C3619B7E-3AF5-58D1-99D1-45CADE74B54C"><title>Class summary</title> <p>The |
24 summary</title> <p>The example shows the use of the following API: </p> <ul> |
27 example shows the use of the following API: </p> <ul> |
25 <li id="GUID-3DF01930-3A0E-5645-8D7E-F70321CB2B31"><p> <xref href="GUID-D1B12DAA-B281-3D8C-9CFF-A2062EA72A0A.dita"><apiname>gamma(double)</apiname></xref> from the Standard C Maths support library (<filepath>libm.dll</filepath>). </p> </li> |
28 <li id="GUID-3DF01930-3A0E-5645-8D7E-F70321CB2B31"><p> <xref href="GUID-D1B12DAA-B281-3D8C-9CFF-A2062EA72A0A.dita"><apiname>gamma(double)</apiname></xref> from |
|
29 the Standard C Maths support library (<filepath>libm.dll</filepath>). </p> </li> |
|
30 </ul> </section> |
26 </ul> </section> |
31 <section id="GUID-7D90F88D-B6DC-5287-AC55-AAF46443874A"><title>Building and |
27 <section id="GUID-7D90F88D-B6DC-5287-AC55-AAF46443874A"><title>Building |
32 configuring</title> <p>To build the example: </p> <ul> |
28 and configuring</title> <p>To build the example: </p> <ul> |
33 <li id="GUID-A00084B3-336E-57DE-A399-33DE044E6021"><p>You can build the example |
29 <li id="GUID-A00084B3-336E-57DE-A399-33DE044E6021"><p>You can build |
34 from your IDE or the command line. </p> <p>If you use an IDE, import the <filepath>bld.inf</filepath> file |
30 the example from your IDE or the command line. </p> <p>If you use |
35 of the example into your IDE, and use the build command of the IDE. </p> <p>If |
31 an IDE, import the <filepath>bld.inf</filepath> file of the example |
36 you use the command line, open a command prompt, and set the current directory |
32 into your IDE, and use the build command of the IDE. </p> <p>If you |
37 to the source code directory of the example. You can then build the example |
33 use the command line, open a command prompt, and set the current directory |
38 with the SBSv1 build tools with the following commands: </p> <p><userinput>bldmake |
34 to the source code directory of the example. You can then build the |
39 bldfiles</userinput> </p> <p><userinput>abld build</userinput> </p> <p> <xref href="GUID-793A5EF9-CC16-5EEB-9011-6431EA76EB15.dita">How to use bldmake</xref> and <xref href="GUID-B6B54E07-3B34-5D5C-8815-93383FA8FB4B.dita">How to use abld</xref> describe |
35 example with the SBSv1 build tools with the following commands: </p> <p><userinput>bldmake bldfiles</userinput> </p> <p><userinput>abld |
40 how to use the SBSv1 build tools. </p> </li> |
36 build</userinput> </p> <p> <xref href="GUID-793A5EF9-CC16-5EEB-9011-6431EA76EB15.dita">How to use bldmake</xref> and <xref href="GUID-B6B54E07-3B34-5D5C-8815-93383FA8FB4B.dita">How to |
41 <li id="GUID-91962C9F-6048-588E-8100-352354DC49C9"><p>For the emulator, the |
37 use abld</xref> describe how to use the SBSv1 build tools. </p> </li> |
42 example builds an executable called <filepath>libmexample.exe</filepath> in |
38 <li id="GUID-91962C9F-6048-588E-8100-352354DC49C9"><p>For the emulator, |
43 the <filepath>epoc32\release\winscw\<udeb or urel>\</filepath> folder. </p> </li> |
39 the example builds an executable called <filepath>libmexample.exe</filepath> in the <filepath>epoc32\release\winscw\<udeb or urel>\</filepath> folder. </p> </li> |
44 </ul> </section> |
40 </ul> </section> |
45 <section id="GUID-97F66C8D-36A9-50D4-8318-2A19BE9832D6"><title>Running the |
41 <section id="GUID-97F66C8D-36A9-50D4-8318-2A19BE9832D6"><title>Running |
46 example</title> <p>Run the <filepath>libmexample.exe</filepath> executable. |
42 the example</title> <p>Run the <filepath>libmexample.exe</filepath> executable. The example application waits for the user to enter |
47 The example application waits for the user to enter an input value. </p> </section> |
43 an input value. </p> </section> |
48 </refbody></reference> |
44 </refbody></reference> |