[30820] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2065 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 19 03:09:42 2008

Date: Fri, 19 Dec 2008 00:09:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 19 Dec 2008     Volume: 11 Number: 2065

Today's topics:
        new CPAN modules on Fri Dec 19 2008 (Randal Schwartz)
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl <uri@stemsystems.com>
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl <tim@burlyhost.com>
    Re: Rounding up in perl <tadmc@seesig.invalid>
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl <tim@burlyhost.com>
    Re: Rounding up in perl sln@netherlands.com
    Re: Rounding up in perl <tim@burlyhost.com>
    Re: Rounding up in perl sln@netherlands.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 19 Dec 2008 05:42:24 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Dec 19 2008
Message-Id: <KC3zuo.47z@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Apache2-WURFLFilter-1.0
http://search.cpan.org/~ifuschini/Apache2-WURFLFilter-1.0/
is a Apache Mobile Filter that manage content (text & image) to the correct mobile device 
----
App-ZofCMS-Plugin-ImageGallery-0.0202
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-ImageGallery-0.0202/
CRUD-like plugin for managing images. 
----
Array-Compare-1.17
http://search.cpan.org/~davecross/Array-Compare-1.17/
Perl extension for comparing arrays. 
----
B-Generate-1.14
http://search.cpan.org/~rurban/B-Generate-1.14/
Create your own op trees. 
----
Bio-Trace-ABIF-1.02
http://search.cpan.org/~vita/Bio-Trace-ABIF-1.02/
Perl extension for reading and parsing ABIF (Applied Biosystems, Inc. Format) files 
----
Business-WebMoney-0.03
http://search.cpan.org/~aml/Business-WebMoney-0.03/
Perl API to WebMoney 
----
Business-WebMoney-0.06
http://search.cpan.org/~aml/Business-WebMoney-0.06/
Perl API to WebMoney 
----
CORBA-Python-2.66
http://search.cpan.org/~perrad/CORBA-Python-2.66/
----
CPAN-Testers-Data-Generator-0.31
http://search.cpan.org/~barbie/CPAN-Testers-Data-Generator-0.31/
Download and summarize CPAN Testers data 
----
Catalyst-Helper-InitScript-FreeBSD-0.01
http://search.cpan.org/~bokutin/Catalyst-Helper-InitScript-FreeBSD-0.01/
/usr/local/etc/rc.d/yourapp.sh generator. 
----
Catalyst-Manual-5.7015
http://search.cpan.org/~hkclark/Catalyst-Manual-5.7015/
The Catalyst developer's manual 
----
Config-General-2.42
http://search.cpan.org/~tlinden/Config-General-2.42/
Generic Config Module 
----
Data-PostfixDeref-0.03
http://search.cpan.org/~bmorrow/Data-PostfixDeref-0.03/
Allow ->[] ->{} as an alternative to @{ } %{ } 
----
Data-Visitor-0.22
http://search.cpan.org/~nuffin/Data-Visitor-0.22/
Visitor style traversal of Perl data structures 
----
Date-Simple-Range-1.1
http://search.cpan.org/~zummo/Date-Simple-Range-1.1/
A range of Date::Simple objects 
----
Devel-PerlySense-0.0171
http://search.cpan.org/~johanl/Devel-PerlySense-0.0171/
Perl IDE backend with Emacs frontend 
----
Devel-PerlySense-0.0172
http://search.cpan.org/~johanl/Devel-PerlySense-0.0172/
Perl IDE backend with Emacs frontend 
----
FormValidator-LazyWay-0.05
http://search.cpan.org/~taro/FormValidator-LazyWay-0.05/
Yet Another Form Validator 
----
Games-Word-0.03
http://search.cpan.org/~doy/Games-Word-0.03/
utility functions for writing word games 
----
Games-Word-0.04
http://search.cpan.org/~doy/Games-Word-0.04/
utility functions for writing word games 
----
Getopt-Mixed-Help-0.21
http://search.cpan.org/~dorner/Getopt-Mixed-Help-0.21/
combine Getopt::Mixed with usage and help 
----
Git-PurePerl-0.38
http://search.cpan.org/~lbrocard/Git-PurePerl-0.38/
A Pure Perl interface to Git repositories 
----
Google-SAML-Response-0.06
http://search.cpan.org/~manni/Google-SAML-Response-0.06/
Generate signed XML documents as SAML responses for Google's SSO implementation 
----
HTML-Latemp-GenMakeHelpers-0.2.0
http://search.cpan.org/~shlomif/HTML-Latemp-GenMakeHelpers-0.2.0/
A Latemp Utility Module. 
----
HTML-Lint-2.06
http://search.cpan.org/~petdance/HTML-Lint-2.06/
check for HTML errors in a string or file 
----
HTML-TurboForm-0.30
http://search.cpan.org/~camelcase/HTML-TurboForm-0.30/
----
HTML-Widget-Factory-0.069
http://search.cpan.org/~rjbs/HTML-Widget-Factory-0.069/
churn out HTML widgets 
----
Hook-LexWrap-0.22
http://search.cpan.org/~chorny/Hook-LexWrap-0.22/
Lexically scoped subroutine wrappers 
----
Hyper-0.04
http://search.cpan.org/~acid/Hyper-0.04/
The global Hyper Workflow Interface 
----
Hyper_0.04
http://search.cpan.org/~acid/Hyper_0.04/
The global Hyper Workflow Interface 
----
IPC-Run-0.82
http://search.cpan.org/~adamk/IPC-Run-0.82/
system() and background procs w/ piping, redirs, ptys (Unix, Win32) 
----
IPC-System-Simple-1.17
http://search.cpan.org/~pjf/IPC-System-Simple-1.17/
Run commands simply, with detailed diagnostics 
----
Judy-HS-0.02
http://search.cpan.org/~jjore/Judy-HS-0.02/
Library for creating and accessing a dynamic array, using an array-of-bytes of Length as an Index and a word as a Value. 
----
Judy-HS-0.03
http://search.cpan.org/~jjore/Judy-HS-0.03/
Library for creating and accessing a dynamic array, using an array-of-bytes of Length as an Index and a word as a Value. 
----
KiokuDB-Backend-BDB-0.07
http://search.cpan.org/~nuffin/KiokuDB-Backend-BDB-0.07/
----
Mac-Finder-DSStore-0.91
http://search.cpan.org/~wiml/Mac-Finder-DSStore-0.91/
Read and write Macintosh Finder DS_Store files 
----
MySQL-Slurp-0.2701
http://search.cpan.org/~ctbrown/MySQL-Slurp-0.2701/
Use PIPEs to write directly to a MySQL table 
----
Net-ASN-1.02
http://search.cpan.org/~dfreedman/Net-ASN-1.02/
Perl extension for manipulating autonomous system numbers 
----
Net-ASN-1.03
http://search.cpan.org/~dfreedman/Net-ASN-1.03/
Perl extension for manipulating autonomous system numbers 
----
Net-Ping-External-0.13
http://search.cpan.org/~chorny/Net-Ping-External-0.13/
Cross-platform interface to ICMP "ping" utilities 
----
Net-SFTP-Foreign-1.46
http://search.cpan.org/~salva/Net-SFTP-Foreign-1.46/
SSH File Transfer Protocol client 
----
POE-Component-CPANPLUS-YACSmoke-1.56
http://search.cpan.org/~bingos/POE-Component-CPANPLUS-YACSmoke-1.56/
Bringing the power of POE to CPAN smoke testing. 
----
POE-Component-CPANPLUS-YACSmoke-1.58
http://search.cpan.org/~bingos/POE-Component-CPANPLUS-YACSmoke-1.58/
Bringing the power of POE to CPAN smoke testing. 
----
POE-Component-MessageQueue-0.2.5
http://search.cpan.org/~dsnopek/POE-Component-MessageQueue-0.2.5/
A POE message queue that uses STOMP for its communication protocol 
----
POE-Session-AttributeBased-0.08
http://search.cpan.org/~cfedde/POE-Session-AttributeBased-0.08/
POE::Session syntax sweetener 
----
Padre-Plugin-CSS-0.01
http://search.cpan.org/~fayland/Padre-Plugin-CSS-0.01/
Padre and CSS 
----
Padre-Plugin-CSS-0.02
http://search.cpan.org/~fayland/Padre-Plugin-CSS-0.02/
Padre and CSS 
----
Padre-Plugin-HTML-0.01
http://search.cpan.org/~fayland/Padre-Plugin-HTML-0.01/
Padre and HTML 
----
Padre-Plugin-HTML-0.02
http://search.cpan.org/~fayland/Padre-Plugin-HTML-0.02/
Padre and HTML 
----
Padre-Plugin-HTML-0.03
http://search.cpan.org/~fayland/Padre-Plugin-HTML-0.03/
Padre and HTML 
----
Padre-Plugin-JSBeautifier-0.01
http://search.cpan.org/~fayland/Padre-Plugin-JSBeautifier-0.01/
beautify javascript in Padre 
----
Padre-Plugin-JavaScript-0.22
http://search.cpan.org/~fayland/Padre-Plugin-JavaScript-0.22/
Padre and JavaScript 
----
Padre-Plugin-XML-0.01
http://search.cpan.org/~fayland/Padre-Plugin-XML-0.01/
Padre and XML 
----
Roman-1.23
http://search.cpan.org/~chorny/Roman-1.23/
Perl module for conversion between Roman and Arabic numerals. 
----
Spreadsheet-XLSX-0.07
http://search.cpan.org/~dmow/Spreadsheet-XLSX-0.07/
Perl extension for reading MS Excel 2007 files; 
----
Statistics-KernelEstimation-0.05
http://search.cpan.org/~janert/Statistics-KernelEstimation-0.05/
Kernel Density Estimates and Histograms 
----
Storable-AMF-0.30
http://search.cpan.org/~grian/Storable-AMF-0.30/
Perl extension for serialize/deserialize AMF0/AMF3 data 
----
Syntax-Highlight-Perl6-0.0291
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.0291/
Perl 6 Syntax Highlighter 
----
Syntax-Highlight-Perl6-0.0292
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.0292/
Perl 6 Syntax Highlighter 
----
Task-POE-All-1.00
http://search.cpan.org/~apocal/Task-POE-All-1.00/
Installs all the modules in the POE::* namespace ( latest version ) 
----
Template-Declare-0.31_01
http://search.cpan.org/~ruz/Template-Declare-0.31_01/
Perlish declarative templates 
----
Teradata-SQL-0.07
http://search.cpan.org/~grommel/Teradata-SQL-0.07/
Perl interface to Teradata SQL 
----
Test-Script-1.04_03
http://search.cpan.org/~adamk/Test-Script-1.04_03/
Cross-platform basic tests for scripts 
----
Text-MicroTemplate-0.05
http://search.cpan.org/~kazuho/Text-MicroTemplate-0.05/
----
Tk-XMLTree-0.01
http://search.cpan.org/~santos/Tk-XMLTree-0.01/
An XML tree widget 
----
mobirc-1.08_01
http://search.cpan.org/~tokuhirom/mobirc-1.08_01/
modern IRC to HTTP gateway 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Date: Fri, 19 Dec 2008 03:03:15 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <qg3mk45uq0gdrcte7tkie9hq185fcnnook@4ax.com>

On Thu, 18 Dec 2008 18:52:30 -0600, Tad J McClellan <tadmc@seesig.invalid> wrote:

>sln@netherlands.com <sln@netherlands.com> wrote:
>
>> taking into account that
>> int() does not use the sign in its process of rounding.
>
>
>That is because int() does not *have* a process of rounding.
>
>int() does not do rounding.

Not only does int() round, but there is no way it can return
without rounding.

sln


perlfunc.html
===============================
Numeric functions

 ..., int, ...

int EXPR

int

Returns the integer portion of EXPR. If EXPR is omitted,
uses $_. You should not use this function for rounding:
one because it truncates towards 0, and two because machine
representations of floating point numbers can sometimes
produce counterintuitive results.




------------------------------

Date: Thu, 18 Dec 2008 22:09:11 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Rounding up in perl
Message-Id: <x74p10rhd4.fsf@stemsystems.com>

>>>>> "s" == sln  <sln@netherlands.com> writes:

  s> On Thu, 18 Dec 2008 18:52:30 -0600, Tad J McClellan <tadmc@seesig.invalid> wrote:

  >> That is because int() does not *have* a process of rounding.
  >> int() does not do rounding.

  s> Not only does int() round, but there is no way it can return
  s> without rounding.

and you determined that from what text in the docs you quote?


  s> perlfunc.html
  s> ===============================
  s> Numeric functions

  s> ..., int, ...

  s> int EXPR

  s> int

  s> Returns the integer portion of EXPR. If EXPR is omitted,
  s> uses $_. You should not use this function for rounding:
  s> one because it truncates towards 0, and two because machine
  s> representations of floating point numbers can sometimes
  s> produce counterintuitive results.

and where does it say int() does rounding? it even says you should NOT
use it for rounding. truncation (which is what int() does) is not
rounding in any sense of the term rounding. your saying otherwise will
not make it so.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Fri, 19 Dec 2008 03:48:24 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <386mk4pjeoghpf3miai8nq82k4r340dv7g@4ax.com>

On Thu, 18 Dec 2008 22:09:11 -0500, Uri Guttman <uri@stemsystems.com> wrote:

>>>>>> "s" == sln  <sln@netherlands.com> writes:
>
>  s> On Thu, 18 Dec 2008 18:52:30 -0600, Tad J McClellan <tadmc@seesig.invalid> wrote:
>
>  >> That is because int() does not *have* a process of rounding.
>  >> int() does not do rounding.
>
>  s> Not only does int() round, but there is no way it can return
>  s> without rounding.
>
>and you determined that from what text in the docs you quote?
>
>
>  s> perlfunc.html
>  s> ===============================
>  s> Numeric functions
>
>  s> ..., int, ...
>
>  s> int EXPR
>
>  s> int
>
>  s> Returns the integer portion of EXPR. If EXPR is omitted,
>  s> uses $_. You should not use this function for rounding:
>  s> one because it truncates towards 0, and two because machine
>  s> representations of floating point numbers can sometimes
>  s> produce counterintuitive results.
>
>and where does it say int() does rounding? it even says you should NOT
>use it for rounding. truncation (which is what int() does) is not
>rounding in any sense of the term rounding. your saying otherwise will
>not make it so.
>
>uri

It says it should not be used for rounding, for TWO reasons.
Thats two references to ROUNDING you say it doesen't use.

sln



------------------------------

Date: Thu, 18 Dec 2008 19:52:28 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Rounding up in perl
Message-Id: <1UE2l.8421$%z5.6062@newsfe09.iad>

sln@netherlands.com wrote:


> 
> It says it should not be used for rounding, for TWO reasons.
> Thats two references to ROUNDING you say it doesen't use.
> 
> sln

Or... it's that it could be used for rounding, but that it's not a good
idea, as you could have unexpected results.  I'm sure there are other
functions to misuse just as easily, if you prefer.
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


------------------------------

Date: Thu, 18 Dec 2008 22:13:57 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Rounding up in perl
Message-Id: <slrngkm7s5.k8a.tadmc@tadmc30.sbcglobal.net>

sln@netherlands.com <sln@netherlands.com> wrote:
> On Thu, 18 Dec 2008 18:52:30 -0600, Tad J McClellan <tadmc@seesig.invalid> wrote:
>
>>sln@netherlands.com <sln@netherlands.com> wrote:
>>
>>> taking into account that
>>> int() does not use the sign in its process of rounding.
>>
>>
>>That is because int() does not *have* a process of rounding.
>>
>>int() does not do rounding.
>
> Not only does int() round,


int() does not do rounding.


> because it truncates towards 0,


int() does do truncating.

truncating is not rounding.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Fri, 19 Dec 2008 04:21:07 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <888mk4pa8652ck7i6m0fjiktp1rionq3eq@4ax.com>

On Thu, 18 Dec 2008 19:52:28 -0800, Tim Greer <tim@burlyhost.com> wrote:

>sln@netherlands.com wrote:
>
>
>> 
>> It says it should not be used for rounding, for TWO reasons.
>> Thats two references to ROUNDING you say it doesen't use.
>> 
>> sln
>
>Or... it's that it could be used for rounding, but that it's not a good
>idea, as you could have unexpected results.
[snip]
And just what is that?

sln



------------------------------

Date: Fri, 19 Dec 2008 04:26:36 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <ab8mk41f57t7hho8mqr37652s1ke0q5tjm@4ax.com>

On Thu, 18 Dec 2008 22:13:57 -0600, Tad J McClellan <tadmc@seesig.invalid> wrote:

>sln@netherlands.com <sln@netherlands.com> wrote:
>> On Thu, 18 Dec 2008 18:52:30 -0600, Tad J McClellan <tadmc@seesig.invalid> wrote:
>>
>>>sln@netherlands.com <sln@netherlands.com> wrote:
>>>
>>>> taking into account that
>>>> int() does not use the sign in its process of rounding.
>>>
>>>
>>>That is because int() does not *have* a process of rounding.
>>>
>>>int() does not do rounding.
>>
>> Not only does int() round,
>
>
>int() does not do rounding.
>
>
>> because it truncates towards 0,
>
>
>int() does do truncating.
>
>truncating is not rounding.

You've confused posts here bud. Your clipping
what the docs? Not my words.

Does it truncate? What does it truncate?
How exactly do you truncate? Please tell us all.
While your at it, tell us what is rounding up and
down and how it relates to Perl.

Then tell us what Perl's int() is good for.

Thanks!

sln



------------------------------

Date: Thu, 18 Dec 2008 21:02:34 -0800
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Rounding up in perl
Message-Id: <agmr16xtfb.ln2@goaway.wombat.san-francisco.ca.us>

On 2008-12-18, sln@netherlands.com <sln@netherlands.com> wrote:
>
> Here is a Perl ceil/floor equivalent. The first code section
> seems to correctly implement floor by taking into account that
> int() does not use the sign in its process of rounding. The
> second code section with floor, although intuitive is not correct.
> For a full proof, all the values between 2.0 - 2.9 should be checked.

Good luck with that proof.  The set of all numbers x such that
2.0 <= x <= 2.9 is uncountable.

Actually...why don't you stop posting till you complete the proof.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information



------------------------------

Date: Fri, 19 Dec 2008 05:26:20 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <fubmk4dgti88vkjs1kori5tpd8tka3rdlh@4ax.com>

On Thu, 18 Dec 2008 21:02:34 -0800, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:

>On 2008-12-18, sln@netherlands.com <sln@netherlands.com> wrote:
>>
>> Here is a Perl ceil/floor equivalent. The first code section
>> seems to correctly implement floor by taking into account that
>> int() does not use the sign in its process of rounding. The
>> second code section with floor, although intuitive is not correct.
>> For a full proof, all the values between 2.0 - 2.9 should be checked.
>
>Good luck with that proof.  The set of all numbers x such that
>2.0 <= x <= 2.9 is uncountable.
>
>Actually...why don't you stop posting till you complete the proof.
>
>--keith

As a proof, I'm only instred in what happens int the +-.1 range (-+)
of .5, not the whole universe of decimal places to the right.

sln


------------------------------

Date: Fri, 19 Dec 2008 06:32:56 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <gofmk4t0okdas0egmrtphd9lparrtujgfn@4ax.com>

On Fri, 19 Dec 2008 05:26:20 GMT, sln@netherlands.com wrote:

>On Thu, 18 Dec 2008 21:02:34 -0800, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
>
>>On 2008-12-18, sln@netherlands.com <sln@netherlands.com> wrote:
>>>
>>> Here is a Perl ceil/floor equivalent. The first code section
>>> seems to correctly implement floor by taking into account that
>>> int() does not use the sign in its process of rounding. The
>>> second code section with floor, although intuitive is not correct.
>>> For a full proof, all the values between 2.0 - 2.9 should be checked.
>>
>>Good luck with that proof.  The set of all numbers x such that
>>2.0 <= x <= 2.9 is uncountable.
>>
>>Actually...why don't you stop posting till you complete the proof.
>>
>>--keith
>
>As a proof, I'm only instred in what happens int the +-.1 range (-+)
>of .5, not the whole universe of decimal places to the right.
>
>sln

Although, margins should be considered a factot in hyperbolic
design considerations, takr it with a grain of salt, add .000000000\
00000000000000000000000000000000000000000000000000000001   and see 
how it plays out.

You just never know, you could discover the asteroid that perishes the 
earth.

sln



------------------------------

Date: Thu, 18 Dec 2008 22:42:35 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Rounding up in perl
Message-Id: <wnH2l.51630$v37.11483@newsfe01.iad>

sln@netherlands.com wrote:

> On Thu, 18 Dec 2008 19:52:28 -0800, Tim Greer <tim@burlyhost.com>
> wrote:
> 
>>sln@netherlands.com wrote:
>>
>>
>>> 
>>> It says it should not be used for rounding, for TWO reasons.
>>> Thats two references to ROUNDING you say it doesen't use.
>>> 
>>> sln
>>
>>Or... it's that it could be used for rounding, but that it's not a
>>good idea, as you could have unexpected results.
> [snip]
> And just what is that?
> 
> sln

It might appear to be working fine and give you the desired/expected
results, but by the nature of it, and as you're warned about in the
docs you quoted yourself, it is not a good idea and probably won't work
how you expect it to.  I don't know what else to say?
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


------------------------------

Date: Fri, 19 Dec 2008 07:21:08 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <plimk45lq4947fi2jta3msnobcfq7qik0i@4ax.com>

On Thu, 18 Dec 2008 22:42:35 -0800, Tim Greer <tim@burlyhost.com> wrote:

>sln@netherlands.com wrote:
>
>> On Thu, 18 Dec 2008 19:52:28 -0800, Tim Greer <tim@burlyhost.com>
>> wrote:
>> 
>>>sln@netherlands.com wrote:
>>>
>>>
>>>> 
>>>> It says it should not be used for rounding, for TWO reasons.
>>>> Thats two references to ROUNDING you say it doesen't use.
>>>> 
>>>> sln
>>>
>>>Or... it's that it could be used for rounding, but that it's not a
>>>good idea, as you could have unexpected results.
>> [snip]
>> And just what is that?
>> 
>> sln
>
>It might appear to be working fine and give you the desired/expected
>results, but by the nature of it, and as you're warned about in the
>docs you quoted yourself, it is not a good idea and probably won't work
>how you expect it to.  I don't know what else to say?

It is certainty for you, you won't and can't depend on Perl intrinsic functions.
Because for you, they work intermittentely and with unexpected results.

I wish you luck.

sln



------------------------------

Date: Thu, 18 Dec 2008 23:31:11 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Rounding up in perl
Message-Id: <35I2l.6241$E46.1680@newsfe21.iad>

sln@netherlands.com wrote:

> On Thu, 18 Dec 2008 22:42:35 -0800, Tim Greer <tim@burlyhost.com>
> wrote:
> 
>>sln@netherlands.com wrote:
>>
>>> On Thu, 18 Dec 2008 19:52:28 -0800, Tim Greer <tim@burlyhost.com>
>>> wrote:
>>> 
>>>>sln@netherlands.com wrote:
>>>>
>>>>
>>>>> 
>>>>> It says it should not be used for rounding, for TWO reasons.
>>>>> Thats two references to ROUNDING you say it doesen't use.
>>>>> 
>>>>> sln
>>>>
>>>>Or... it's that it could be used for rounding, but that it's not a
>>>>good idea, as you could have unexpected results.
>>> [snip]
>>> And just what is that?
>>> 
>>> sln
>>
>>It might appear to be working fine and give you the desired/expected
>>results, but by the nature of it, and as you're warned about in the
>>docs you quoted yourself, it is not a good idea and probably won't
>>work
>>how you expect it to.  I don't know what else to say?
> 
> It is certainty for you, you won't and can't depend on Perl intrinsic
> functions. Because for you, they work intermittentely and with
> unexpected results.
> 
> I wish you luck.
> 
> sln

I didn't create it, I didn't write the documentation about it.  While
I'm sure one could work with said function to do rounding, it's not
intended to round and suffers from side effects.  For the record, in
many, many years of coding in Perl, I've never had a single program
have unexpected results.  This is probably attributed to the fact that
I use the correct, intended functions for what they were designed for,
assuming I don't roll out my own.  Probably, ignoring the intent of a
function not being what you think it is, and the docs warning not to
use it for the purpose you want, is why you're so confused?  Don't take
that out on me.  Obviously, you _can_ use int() to round, but I doubt
it's going to work like you think.  You *do* know what truncation is,
right?
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


------------------------------

Date: Fri, 19 Dec 2008 07:48:04 GMT
From: sln@netherlands.com
Subject: Re: Rounding up in perl
Message-Id: <m8kmk4debbq12b6ehubrpagijfqgiog099@4ax.com>

On Thu, 18 Dec 2008 23:31:11 -0800, Tim Greer <tim@burlyhost.com> wrote:

>sln@netherlands.com wrote:
>
>> On Thu, 18 Dec 2008 22:42:35 -0800, Tim Greer <tim@burlyhost.com>
>> wrote:
>> 
>>>sln@netherlands.com wrote:
>>>
>>>> On Thu, 18 Dec 2008 19:52:28 -0800, Tim Greer <tim@burlyhost.com>
>>>> wrote:
>>>> 
>>>>>sln@netherlands.com wrote:
>>>>>
>>>>>
>>>>>> 
>>>>>> It says it should not be used for rounding, for TWO reasons.
>>>>>> Thats two references to ROUNDING you say it doesen't use.
>>>>>> 
>>>>>> sln
>>>>>
>>>>>Or... it's that it could be used for rounding, but that it's not a
>>>>>good idea, as you could have unexpected results.
>>>> [snip]
>>>> And just what is that?
>>>> 
>>>> sln
>>>
>>>It might appear to be working fine and give you the desired/expected
>>>results, but by the nature of it, and as you're warned about in the
>>>docs you quoted yourself, it is not a good idea and probably won't
>>>work
>>>how you expect it to.  I don't know what else to say?
>> 
>> It is certainty for you, you won't and can't depend on Perl intrinsic
>> functions. Because for you, they work intermittentely and with
>> unexpected results.
>> 
>> I wish you luck.
>> 
>> sln
>
>I didn't create it, I didn't write the documentation about it.  While
>I'm sure one could work with said function to do rounding, it's not
>intended to round and suffers from side effects.
[snip]

Ah, just what is the intention of int()? And what are the 'side' effects?

sln



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 2065
***************************************


home help back first fref pref prev next nref lref last post