• 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: Can someone explain this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can someone explain this?


  • Subject: Re: Can someone explain this?
  • From: Philip Aker <email@hidden>
  • Date: Sun, 15 Mar 2009 03:47:28 -0700

On 2009-03-14, at 13:48:27, Mark J. Reed wrote:

As I said, if you use pow(), there's no ambiguity. -pow(3,2) is distinct from pow(-3,2). With the operator form, it just depends on how the language ranks the precedence of the exponentiation operator with respect to unary minus.

I actually was only showing how to make the call to Tcl (8.4) in a slightly more convenient form in order to augment the impressive show of polyglotism ever so slightly. I had no intention of entering the heated math debate on any side.



$ echo 'puts [expr -3**2]' | tclsh # requires TCL 8.5, no ** operator in <= 8.4


For those sufferin' with Tcl 8.4 it's:


$ tclsh <<< 'puts [expr pow(-3,2)];';


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
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: 
 >Can someone explain this? (From: Michelle Steiner <email@hidden>)
 >Re: Can someone explain this? (From: Philip Aker <email@hidden>)
 >Re: Can someone explain this? (From: Deivy Marck Petrescu <email@hidden>)
 >Re: Can someone explain this? (From: "Mark J. Reed" <email@hidden>)
 >Re: Can someone explain this? (From: "Mark J. Reed" <email@hidden>)
 >Re: Can someone explain this? (From: Philip Aker <email@hidden>)
 >Re: Can someone explain this? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Newbie needs help
  • Next by Date: Re: Can someone explain this?
  • Previous by thread: Re: Can someone explain this?
  • Next by thread: Re: Can someone explain this?
  • Index(es):
    • Date
    • Thread