<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Arithmetic operation on decimals in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075369#M738342</link>
    <description>See this link for dtksh:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1151323" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1151323&lt;/A&gt;</description>
    <pubDate>Sun, 21 Oct 2007 16:51:51 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-10-21T16:51:51Z</dc:date>
    <item>
      <title>Arithmetic operation on decimals</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075367#M738340</link>
      <description>How to do arithmetic operations on decimal.&lt;BR /&gt;&lt;BR /&gt;like adding 142.5 and 586.1?</description>
      <pubDate>Sun, 21 Oct 2007 16:25:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075367#M738340</guid>
      <dc:creator>SKSingh_1</dc:creator>
      <dc:date>2007-10-21T16:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic operation on decimals</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075368#M738341</link>
      <description>You are either going to have to use awk, bc(1) or dc(1) or write a C program.&lt;BR /&gt;&lt;BR /&gt;Or use fixed point scaled arithmetic.&lt;BR /&gt;I'm not sure if dtksh supports it?</description>
      <pubDate>Sun, 21 Oct 2007 16:45:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075368#M738341</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-10-21T16:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic operation on decimals</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075369#M738342</link>
      <description>See this link for dtksh:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1151323" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1151323&lt;/A&gt;</description>
      <pubDate>Sun, 21 Oct 2007 16:51:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075369#M738342</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-10-21T16:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic operation on decimals</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075370#M738343</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;HP-UX offers a Korn93 shell which supports floating point arithmetic:&lt;BR /&gt;&lt;BR /&gt;# cat ./domath&lt;BR /&gt;#!/usr/dt/bin/dtksh&lt;BR /&gt;typeset -F  R1&lt;BR /&gt;typeset -F3 R2&lt;BR /&gt;typeset -E  R3&lt;BR /&gt;typeset -F1 R4&lt;BR /&gt;let R1=1/8&lt;BR /&gt;echo ${R1}&lt;BR /&gt;let R2=1/8&lt;BR /&gt;echo ${R2}&lt;BR /&gt;let R3=1/8&lt;BR /&gt;echo ${R3}&lt;BR /&gt;let R4=142.5+586.1&lt;BR /&gt;echo ${R4}&lt;BR /&gt;&lt;BR /&gt;# ./domath&lt;BR /&gt;.1250000000&lt;BR /&gt;.125&lt;BR /&gt;0.125&lt;BR /&gt;728.6&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 21 Oct 2007 16:57:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075370#M738343</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-10-21T16:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic operation on decimals</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075371#M738344</link>
      <description>If the question is really...&lt;BR /&gt;&amp;gt;&amp;gt; How to do arithmetic operations on decimal.&lt;BR /&gt;like adding 142.5 and 586.1?&lt;BR /&gt;&lt;BR /&gt;Then, might I suggest one of those $1.50 calculators you can get at the local supermarkets?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ok, I'm teasing you here, but you see what I mean?&lt;BR /&gt;What is the real problem you are trying to solve?&lt;BR /&gt;Where are the numbers coming from, where are they going to be consumed?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The shell solution MIGHT be a quick awk program, or 'bc' or 'dc'&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;$ TEST=$(echo 142.5 + 586.1 | bc -l)&lt;BR /&gt;$ echo $TEST&lt;BR /&gt;728.6&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Oct 2007 17:47:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075371#M738344</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-10-21T17:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arithmetic operation on decimals</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075372#M738345</link>
      <description>Yes, got the answer Thank you.</description>
      <pubDate>Wed, 24 Oct 2007 02:08:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/arithmetic-operation-on-decimals/m-p/5075372#M738345</guid>
      <dc:creator>SKSingh_1</dc:creator>
      <dc:date>2007-10-24T02:08:41Z</dc:date>
    </item>
  </channel>
</rss>

