<?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: rounding up numbers... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944968#M760728</link>
    <description>that is it..Thanks..I just have to import this and to recreate it to fit in my main script &lt;BR /&gt;&lt;BR /&gt;thanks..:)</description>
    <pubDate>Thu, 15 Feb 2007 06:11:00 GMT</pubDate>
    <dc:creator>amonamon</dc:creator>
    <dc:date>2007-02-15T06:11:00Z</dc:date>
    <item>
      <title>rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944962#M760722</link>
      <description>My problem lies in rounding numbers..&lt;BR /&gt;&lt;BR /&gt;Let say I have as input 13 in script it should be rounded to 15 and multiplied with 9.5 and divided with 100&lt;BR /&gt;(or if I have as input 11 it should return 15, or for 19 it should be 20)&lt;BR /&gt;&lt;BR /&gt;result is 1,425 but becouse I want this to be rounded final result should be 2.&lt;BR /&gt;&lt;BR /&gt;can anyone give me a clue or help me with this..I tried something in KSH with &lt;BR /&gt;&lt;BR /&gt;line this:&lt;BR /&gt;&lt;BR /&gt;$echo "scale=2; 13 / 100" | bc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks in advance..</description>
      <pubDate>Thu, 15 Feb 2007 02:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944962#M760722</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-02-15T02:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944963#M760723</link>
      <description>Hi,&lt;BR /&gt;could you please provide a few more expected output values, given these input values:&lt;BR /&gt;0&lt;BR /&gt;4&lt;BR /&gt;5&lt;BR /&gt;6&lt;BR /&gt;9&lt;BR /&gt;10&lt;BR /&gt;11=15&lt;BR /&gt;14&lt;BR /&gt;15&lt;BR /&gt;16&lt;BR /&gt;19=20&lt;BR /&gt;20&lt;BR /&gt;21&lt;BR /&gt;&lt;BR /&gt;If I understand correctly, round to the nearest multiple of 5 ?&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 03:14:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944963#M760723</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-15T03:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944964#M760724</link>
      <description>yes U are right..&lt;BR /&gt;&lt;BR /&gt;0 =0&lt;BR /&gt;4 =5&lt;BR /&gt;5 =5&lt;BR /&gt;6 =10&lt;BR /&gt;9 =10&lt;BR /&gt;10=10&lt;BR /&gt;11=15&lt;BR /&gt;14=15&lt;BR /&gt;15=15&lt;BR /&gt;16=20&lt;BR /&gt;19=20&lt;BR /&gt;20=20&lt;BR /&gt;21=25&lt;BR /&gt;&lt;BR /&gt;first round in input..and it is rounded as above..&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Thu, 15 Feb 2007 03:20:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944964#M760724</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-02-15T03:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944965#M760725</link>
      <description>Hi,&lt;BR /&gt;how about:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;a=0&lt;BR /&gt;while [ a -lt 30 ]&lt;BR /&gt;do&lt;BR /&gt;b=`echo "($a+4)/5" | bc`&lt;BR /&gt;c=`echo "$b * 5" | bc`&lt;BR /&gt;echo $a $b $c&lt;BR /&gt;a=`expr $a + 1`&lt;BR /&gt;done</description>
      <pubDate>Thu, 15 Feb 2007 03:35:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944965#M760725</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-15T03:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944966#M760726</link>
      <description>yes but I need to round up..just certain input..&lt;BR /&gt;&lt;BR /&gt;like this:&lt;BR /&gt;&lt;BR /&gt;Let say I have as input 13 in script it should be rounded to 15 and then multiplied with 9.5(constant) and then divided with 100&lt;BR /&gt;(or if I have as input 11 it should return 15, or for 19 it should be 20)&lt;BR /&gt;&lt;BR /&gt;result is 1,425 but becouse I want this to be rounded final result should be 2.&lt;BR /&gt;&lt;BR /&gt;thansks for useful hint!!&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 04:38:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944966#M760726</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-02-15T04:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944967#M760727</link>
      <description>Hi,&lt;BR /&gt;so, for&lt;BR /&gt;Input 13&lt;BR /&gt;Round up 13 to 15, then multiply 15 by 9.5 and devide by 100, resulting in 1.425. Then round this up to 2 ?&lt;BR /&gt;&lt;BR /&gt;Can you please comment on results of:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;a=0&lt;BR /&gt;while [ a -lt 30 ]&lt;BR /&gt;do&lt;BR /&gt;b=`echo "($a+4)/5" | bc`&lt;BR /&gt;c=`echo "$b * 5" | bc`&lt;BR /&gt;d=`echo "scale=3;($c * 9.5) / 100" | bc`&lt;BR /&gt;e=`echo "(($c * 9.5) / 100)+1" | bc`&lt;BR /&gt;echo "Input $a  Rounded Input $c Output $d  Rounded Output $e"&lt;BR /&gt;a=`expr $a + 1`&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 05:45:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944967#M760727</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-15T05:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944968#M760728</link>
      <description>that is it..Thanks..I just have to import this and to recreate it to fit in my main script &lt;BR /&gt;&lt;BR /&gt;thanks..:)</description>
      <pubDate>Thu, 15 Feb 2007 06:11:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944968#M760728</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-02-15T06:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944969#M760729</link>
      <description>&lt;!--!*#--&gt;If your numbers are less than 2 billion, you can use shell arithmetic.  From Peter's first example:&lt;BR /&gt;typeset -i a=0&lt;BR /&gt;while [ a -lt 30 ]; do&lt;BR /&gt;   (( b = ((a+4)/5)*5 ))&lt;BR /&gt;   echo "Input $a, Rounded Input $b"&lt;BR /&gt;   (( a = a + 1 ))&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;If you want to change the number 5 above, that 4 is really (5-1).</description>
      <pubDate>Thu, 15 Feb 2007 23:47:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944969#M760729</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-15T23:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: rounding up numbers...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944970#M760730</link>
      <description>thanks for prompt assistence..&lt;BR /&gt;&lt;BR /&gt;Cheers,</description>
      <pubDate>Fri, 16 Feb 2007 02:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rounding-up-numbers/m-p/3944970#M760730</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-02-16T02:05:41Z</dc:date>
    </item>
  </channel>
</rss>

