[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Steffen Märcker
Typo: FP should read floating point and not fixed point. Steffen Märcker schrieb am Dienstag, 15. Juni 2021 08:47:24 (+02:00): > Have you considered using fixed-point arithmetic? For example: > 7.1s2 roundTo: 0.1s2 > > The rule of thumb I stick to is to use FP only if I know the inaccuracies > wo

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Steffen Märcker
Have you considered using fixed-point arithmetic? For example: 7.1s2 roundTo: 0.1s2 The rule of thumb I stick to is to use FP only if I know the inaccuracies won't bite me. Funny enough, both 7.1 and 0.1 are already not accurately representable as floats. (And by coincidence, I prepared exam ques

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Konrad Hinsen
On 15/06/2021 01:03, Esteban Maringolo wrote: Sure, but what initiated this thread was a reference to roundTo: 0.1 which produced a "wrong" output. (9.1 + (-2.0)) roundTo: 0.1 "=> 7.1005" 7.1 roundTo: 0.1 "=> 7.1005" However, at this point I know that Pharo "does the rig

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Esteban Maringolo
On Mon, Jun 14, 2021 at 10:37 PM Richard O'Keefe wrote: > For what it's worth, I expected ScaledDecimal to act like fixed point > arithmetic, and implemented it that way in my own Smalltalk library, where > two ScaledDecimals *do* print the same if and only if they are numerically > exactly the s

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Richard O'Keefe
It's not quite clear what is happening in the other systems. Here is R > 6.7 + (32.8 - 35) [1] 4.5 > round(6.7 + (32.8 - 35)) [1] 4 The result *is* 4.49 but is *printed* as 4.5. Here is Gambit Scheme > (+ 6.7 (- 32.8 35)) 4.497 > (round (+ 6.7 (- 32.8 35))) 4. Here is astc S

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Esteban Maringolo
Hi Sven, > > If in Pharo [1] you do: > > a := 6.7 + (32.8 - 35) > > It will produce: > > 4.497 > > Which, when rounded, will produce 4. > But, > a roundTo: 0.1 "=> 4.5" Sure, but what initiated this thread was a reference to roundTo: 0.1 which produced a "wrong" output. (9.1 + (-2.0

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Sven Van Caekenberghe
BTW, I recently wrote my own float printer, as an experiment. NeoJSONFloatPrinter lowPrecision print: a. => 4.5 What I wanted was a human friendly, compact float printer, that tries to go for the shortest, simplest number. It prefers integers and goes to scientific notation when needed, while

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Sven Van Caekenberghe
> On 14 Jun 2021, at 22:44, Esteban Maringolo wrote: > > I'm coming back to this because I've been bitten by these floating > points things again. > > If in Pharo [1] you do: > a := 6.7 + (32.8 - 35) > > It will produce: > 4.497 > > Which, when rounded, will produce 4. But, a

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Esteban Maringolo
I'm coming back to this because I've been bitten by these floating points things again. If in Pharo [1] you do: a := 6.7 + (32.8 - 35) It will produce: 4.497 Which, when rounded, will produce 4. In other places [2] I do the same simple addition and subtraction it produces 4.5, that

[Pharo-users] [ANN] Hyperspace v2.8.0 [v2.8.0] released!

2021-06-14 Thread Buenos Aires Smalltalk
Hyperspace, a couple of facilities on top of Zinc HTTP Components reached it's v2.8.0 version. Changelog HTTPNotAcceptable now allows to signal it including the supported languages information. Add ZnResponse>>#varyHeaderNames and ZnResponse>>#addToVary: to handle access and addition to Vary heade

[Pharo-users] Re: [ANN] Pharo-ODBC

2021-06-14 Thread Esteban Maringolo
Thank you John! This is very good news! Best regards, Esteban A. Maringolo On Mon, Jun 14, 2021 at 6:29 AM John Aspinall wrote: > > There is now an ODBC framework for Pharo, available at the pharo-rdbms github > site: > > https://github.com/pharo-rdbms/Pharo-ODBC > > This is based on the Dolph

[Pharo-users] Re: [ANN] Pharo-ODBC

2021-06-14 Thread Stéphane Ducasse
Thanks john this is a great news! S. > On 14 Jun 2021, at 11:29, John Aspinall wrote: > > There is now an ODBC framework for Pharo, available at the pharo-rdbms github > site: > > https://github.com/pharo-rdbms/Pharo-ODBC > > > This is based on t

[Pharo-users] Re: [ANN] Pharo-ODBC

2021-06-14 Thread Tomaž Turk
Great, thank you! Best wishes, Tomaz

[Pharo-users] [ANN] Pharo-ODBC

2021-06-14 Thread John Aspinall
There is now an ODBC framework for Pharo, available at the pharo-rdbms github site: https://github.com/pharo-rdbms/Pharo-ODBC This is based on the Dolphin Smalltalk Database Connection ODBC framework. Provided a suitable driver manager is installed t

[Pharo-users] Re: New Pharo-based commercial software

2021-06-14 Thread Noury Bouraqadi
Thank you all for the nice words and the support. Noury On Jun 14 2021, at 9:38 am, Sven Van Caekenberghe wrote: > Congratulations. This is a really good concept, and it looks nice as well. > > > On 12 Jun 2021, at 11:36, Noury Bouraqadi wrote: > > > > Hi everyone, > > > > I'm glad to announce a

[Pharo-users] Re: New Pharo-based commercial software

2021-06-14 Thread Noury Bouraqadi
It's for university undergraduate programs. Noury On Jun 14 2021, at 8:40 am, Petter wrote: > Hi, and congratulations - the product looks really cool! > > Which school age are the tasks made for? > Petter > > > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html >

[Pharo-users] Re: New Pharo-based commercial software

2021-06-14 Thread Sven Van Caekenberghe
Congratulations. This is a really good concept, and it looks nice as well. > On 12 Jun 2021, at 11:36, Noury Bouraqadi wrote: > > Hi everyone, > > I'm glad to announce a new Pharo-based commercial product: PLC3000 > (https://plc3000.com). > > It's a SaaS solution for teaching PLC programming