• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Yosemite decimal number conversion error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yosemite decimal number conversion error


  • Subject: Re: Yosemite decimal number conversion error
  • From: Takaaki Naganoya <email@hidden>
  • Date: Wed, 29 Oct 2014 16:16:39 +0900

2014/10/29 15:03、Shane Stanley <email@hidden> のメール:
> On 29 Oct 2014, at 3:22 pm, Takaaki Naganoya <email@hidden> wrote:
>> --> {-100, -1, 0.10000000149, 1, 1.100000023842, 10}--Result (!!!!)
>
> The problem is that many values can't be accurately stored as binary values -- there is always some rounding involved. The value 0.1 in binary is:
>
> 1100110011001100110011001100110011... ad infinitum.
>
> So somewhere along the line, some rounding is done. The net result is that the value depends on the precision it's stored in.
>
> But apart from looking a bit odd, what practical problem is there with the result you have above?

I can understand the mechanism. But I can not judge it as a bug or a spec.

bug: To be fixed in the near future
spec: Not to be fixed forever...

If this behavior is based on the Scripting Bridge system’s specification, it should be regretful.
If this behavior is a trivial bug, the programmer should be regretful.

A practical plan is not to use decimal number lists within AppleScriptObjC (cocoa-styled) handler for me.

--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Yosemite decimal number conversion error (From: Takaaki Naganoya <email@hidden>)
 >Re: Yosemite decimal number conversion error (From: Shane Stanley <email@hidden>)
 >Re: Yosemite decimal number conversion error (From: Takaaki Naganoya <email@hidden>)
 >Re: Yosemite decimal number conversion error (From: Shane Stanley <email@hidden>)

  • Prev by Date: Timing is everything [Was: Re: Yosemite decimal number conversion error]
  • Next by Date: Re: Yosemite shell script
  • Previous by thread: Re: Yosemite decimal number conversion error
  • Next by thread: Timing is everything [Was: Re: Yosemite decimal number conversion error]
  • Index(es):
    • Date
    • Thread