Maxima – 90- Polinomi – funzioni e variabili – 4

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.276.

gcdex (f, g)
gcdex (f, g, x)
Returns a list [a, b, u] where u is the greatest common divisor (gcd) of f and g, and u is equal to a f + b g. The arguments f and g should be univariate polynomials, or else polynomials in x a supplied main variable since we need to be in a principal ideal domain for this to work. The gcd means the gcd regarding f and g as univariate polynomials with coefficients being rational functions in the other variables.

gcdex implements the Euclidean algorithm, where we have a sequence of L[i]: [a[i], b[i], r[i]] which are all perpendicular to [f, g, -1] and the next one is built as if q = quotient(r[i]/r[i+1]) then L[i+2]: L[i] - q L[i+1], and it terminates at L[i+1] when the remainder r[i+2] is zero.

The arguments f and g can be integers. For this case the function igcdex is called by gcdex.

See also ezgcd, gcd, gcdivide, and poly_gcd.

(%i1) gcdex (x^2 + 1, x^3 + 4);
                              2
                             x  + 4 x - 1  x + 4
(%o1)/R/                  [- ------------, -----, 1]
                                  17        17
(%i2) % . [x^2 + 1, x^3 + 4, -1];
(%o2)/R/                               0

Note that the gcd in the following is 1 since we work in k(y)[x], not the y+1 we would expect in k[y, x].

(%i3) gcdex (x*(y + 1), y^2 - 1, x);
                                      1
(%o3)/R/                        [0, ------, 1]
                                     2
                                    y  - 1

gcfactor (n)
Factors the Gaussian integer n over the Gaussian integers, i.e., numbers of the form a + b %i where a and b are rational integers (i.e., ordinary integers). Factors are normalized by making a and b non-negative.

gcfactor (expr)
Factors the polynomial expr over the Gaussian integers (that is, the integers with the imaginary unit %i adjoined). This is like factor(expr, a^2+1) where a is %i.

(%i4) gfactor (x^4 - 1);
(%o4)                  (x - 1) (x + 1) (x - %i) (x + %i)

gfactorsum (expr)
is similar to factorsum but applies gfactor instead of factor.

hipow (expr, x)
Returns the highest explicit exponent of x in expr. x may be a variable or a general expression. If x does not appear in expr, hipow returns 0.

hipow does not consider expressions equivalent to expr. In particular, hipow does not expand expr, so hipow(expr, x) and hipow(expand(expr, x)) may yield different results.

(%i5) hipow (y^3 * x^2 + x * y^4, x);
(%o5)                                  2
(%i6) hipow ((x + y)^5, x);
(%o6)                                  1
(%i7) hipow (expand ((x + y)^5), x);
(%o7)                                  5
(%i8) hipow (expand ((x + y)^5), x + y);
(%o8)                                  0

intfaclim
Default value: true.

If true, maxima will give up factorization of integers if no factor is found after trial divisions and Pollard’s rho method and factorization will not be complete.

When intfaclim is false (this is the case when the user calls factor explicitly), complete factorization will be attempted. intfaclim is set to false when factors are computed in divisors, divsum and totient.

Internal calls to factor respect the user-specified value of intfaclim. Setting intfaclim to true may reduce the time spent factoring large integers.

keepfloat
Default value: false.

When keepfloat is true, prevents floating point numbers from being rationalized when expressions which contain them are converted to canonical rational expression (CRE) form.

Note that the function solve and those functions calling it (eigenvalues, for example) currently ignore this flag, converting floating point numbers anyway.

(%i9) rat(x/2.0);

rat: replaced 0.5 by 1/2 = 0.5
                                       x
(%o9)/R/                               -
                                       2
(%i10) rat(x/2.0), keepfloat;
(%o10)/R/                            0.5 x

solve ignores keepfloat:

(%i11) solve(1.0-x,x), keepfloat;

rat: replaced 1.0 by 1/1 = 1.0
(%o11)                              [x = 1]

lopow (expr, x)
Returns the lowest exponent of x which explicitly appears in expr.

(%i12) lopow ((x+y)^2 + (x+y)^a, x+y);
(%o12)                             min(2, a)

lratsubst (L, expr)
is analogous to subst(L, expr) except that it uses ratsubst instead of subst.

The first argument of lratsubst is an equation or a list of equations identical in format to that accepted by subst. The substitutions are made in the order given by the list of equations, that is, from left to right.

load("lrats") loads fullratsubst and lratsubst.

(%i13) load ("lrats")$

subst can carry out multiple substitutions. lratsubst is analogous to subst.

(%i14) subst ([a = b, c = d], a + c);
(%o14)                               d + b
(%i15) lratsubst ([a^2 = b, c^2 = d], (a + e)*c*(a + c));
(%o15)                      (d + a c) e + a d + b c

If only one substitution is desired, then a single equation may be given as first argument.

(%i16) lratsubst (a^2 = b, a^3);
(%o16)                                a b

modulus
Default value: false.

When modulus is a positive number p, operations on rational numbers (as returned by rat and related functions) are carried out modulo p, using the so-called “balanced” modulus system in which n modulo p is defined as an integer k in [-(p-1)/2, ..., 0, ..., (p-1)/2] when p is odd, or [-(p/2 - 1), ..., 0, ...., p/2] when p is even, such that a p + k equals n for some integer a.

If expr is already in canonical rational expression (CRE) form when modulus is reset, then you may need to re-rat expr, e.g., expr: rat (ratdisrep (expr)), in order to get correct results.

Typically modulus is set to a prime number. If modulus is set to a positive non-prime integer, this setting is accepted, but a warning message is displayed. Maxima signals an error, when zero or a negative integer is assigned to modulus.

(%i17) modulus:7;
(%o17)                                 7
(%i18) polymod([0,1,2,3,4,5,6,7]);
(%o18)                  [0, 1, 2, 3, - 3, - 2, - 1, 0]
(%i19) modulus:false;
(%o19)                               false
(%i20) poly:x^6+x^2+1;
                                   6    2
(%o20)                            x  + x  + 1
(%i21) factor(poly);
                                   6    2
(%o21)                            x  + x  + 1
(%i22) modulus:13;
(%o22)                                13
(%i23) factor(poly);
                             2        4      2
(%o23)                     (x  + 6) (x  - 6 x  - 2)
(%i24) polymod(%);
                                   6    2
(%o24)                            x  + x  + 1

Maxima – 89- Polinomi – funzioni e variabili – 3

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.272.

factorflag
Default value: false.

When factorflag is false, suppresses the factoring of integer factors of rational expressions.

factorout (expr, x_1, x_2, ...)
Rearranges the sum expr into a sum of terms of the form f(x_1, x_2, ...)*g where g is a product of expressions not containing any x_i and f is factored. Note that the option variable keepfloat is ignored by factorout.

(%i1) expand (a*(x+1)*(x-1)*(u+1)^2);
                    2  2          2      2      2
(%o1)            a u  x  + 2 a u x  + a x  - a u  - 2 a u - a
(%i2) factorout(%,x);
          2
(%o2)  a u  (x - 1) (x + 1) + 2 a u (x - 1) (x + 1) + a (x - 1) (x + 1)

factorsum (expr)
Tries to group terms in factors of expr which are sums into groups of terms such that their sum is factorable. factorsum can recover the result of expand((x + y)^2 + (z + w)^2) but it can’t recover expand((x + 1)^2 + (x + y)^2) because the terms have variables in common.

(%i3) expand ((x + 1)*((u + v)^2 + a*(w + z)^2));
           2      2                            2      2                2
(%o3) a x z  + a z  + 2 a w x z + 2 a w z + a w  x + v  x + 2 u v x + u  x
                                                            2    2            2
                                                       + a w  + v  + 2 u v + u
(%i4) factorsum (%);
                                          2          2
(%o4)                   (x + 1) (a (z + w)  + (v + u) )

fasttimes (p_1, p_2)
Returns the product of the polynomials p_1 and p_2 by using a special algorithm for multiplication of polynomials. p_1 and p_2 should be multivariate, dense, and nearly the same size. Classical multiplication is of order n_1 n_2 where n_1 is the degree of p_1 and n_2 is the degree of p_2. fasttimes is of order max(n_1, n_2)^1.585.

fullratsimp (expr)
fullratsimp repeatedly applies ratsimp followed by non-rational simplification to an expression until no further change occurs, and returns the result.

When non-rational expressions are involved, one call to ratsimp followed as is usual by non-rational (“general”) simplification may not be sufficient to return a simplified result. Sometimes, more than one such call may be necessary. fullratsimp makes this process convenient.

fullratsimp(expr, x_1, ..., x_n) takes one or more arguments similar to ratsimp and rat.

(%i5) expr: (x^(a/2) + 1)^2*(x^(a/2) - 1)^2/(x^a - 1);
                              a/2     2   a/2     2
                            (x    - 1)  (x    + 1)
(%o5)                       -----------------------
                                     a
                                    x  - 1
(%i6) ratsimp (expr);
                                 2 a      a
                                x    - 2 x  + 1
(%o6)                           ---------------
                                     a
                                    x  - 1
(%i7) fullratsimp (expr);
                                     a
(%o7)                               x  - 1
(%i8) rat (expr);
                              a/2 4       a/2 2
                            (x   )  - 2 (x   )  + 1
(%o8)/R/                    -----------------------
                                     a
                                    x  - 1

fullratsubst (a, b, c)
is the same as ratsubst except that it calls itself recursively on its result until that result stops changing. This function is useful when the replacement expression and the replaced expression have one or more variables in common.

fullratsubst will also accept its arguments in the format of lratsubst. That is, the first argument may be a single substitution equation or a list of such equations, while the second argument is the expression being processed.

load ("lrats") loads fullratsubst and lratsubst.

(%i9) load ("lrats")$

subst can carry out multiple substitutions. lratsubst is analogous to subst

(%i10) subst ([a = b, c = d], a + c);
(%o10)                               d + b
(%i11) lratsubst ([a^2 = b, c^2 = d], (a + e)*c*(a + c));
(%o11)                      (d + a c) e + a d + b c

If only one substitution is desired, then a single equation may be given as first argument.

(%i12) lratsubst (a^2 = b, a^3);
(%o12)                                a b

fullratsubst is equivalent to ratsubst except that it recurses until its result stops changing.

(%i13) ratsubst (b*a, a^2, a^3);
                                      2
(%o13)                               a  b
(%i14) fullratsubst (b*a, a^2, a^3);
                                        2
(%o14)                               a b

fullratsubst also accepts a list of equations or a single equation as first argument.

(%i15) fullratsubst ([a^2 = b, b^2 = c, c^2 = a], a^3*b*c);
(%o15)                                 b
(%i16) fullratsubst (a^2 = b*a, a^3);
                                        2
(%o16)                               a b

fullratsubst may cause an indefinite recursion.

(%i17) errcatch (fullratsubst (b*a^2, a^2, a^3));
(%o17)                                []

gcd (p_1, p_2, x_1, ...)
Returns the greatest common divisor of p_1 and p_2. The flag gcd determines which algorithm is employed. Setting gcd to ez, subres, red, or spmod selects the ezgcd, subresultant prs, reduced, or modular algorithm, respectively. If gcd false then gcd(p_1, p_2, x) always returns 1 for all x. Many functions (e.g. ratsimp, factor, etc.) cause gcd’s to be taken implicitly. For homogeneous polynomials it is recommended that gcd equal to subres be used. To take the gcd when an algebraic is present, e.g., gcd(x^2 - 2*sqrt(2)* x + 2, x - sqrt(2)), the option variable algebraic must be true and gcd must not be ez.

The gcd flag, default: spmod, if false will also prevent the greatest common divisor from being taken when expressions are converted to canonical rational expression (CRE) form. This will sometimes speed the calculation if gcds are not required.

See also ezgcd, gcdex, gcdivide, and poly_gcd.

(%i18) p1: 6*x^3+19*x^2+19*x+6;
                               3       2
(%o18)                      6 x  + 19 x  + 19 x + 6
(%i19) p2: 6*x^5+13*x^4+12*x^3+13*x^2+6*x;
                         5       4       3       2
(%o19)                6 x  + 13 x  + 12 x  + 13 x  + 6 x
(%i20) gcd(p1, p2);
                                   2
(%o20)                          6 x  + 13 x + 6
(%i21) p1/gcd(p1, p2), ratsimp;
(%o21)                               x + 1
(%i22) p2/gcd(p1, p2), ratsimp;
                                     3
(%o22)                              x  + x

ezgcd returns a list whose first element is the greatest common divisor of the polynomials p_1 and p_2, and whose remaining elements are the polynomials divided by the greatest common divisor.

(%i23) ezgcd(p1, p2);
                           2                     3
(%o23)                 [6 x  + 13 x + 6, x + 1, x  + x]

Visto nel Web – 363

Lista lunghissima (non tutta controllata, confesso) ma c’era tanto da wedere nel Web 😜

“Hackett: a metaprogrammable Haskell” by Alexis King @lexi_lambda
language Racket | programmazione funzionale
::: strangeloop_stl

Die Flash, die! Hackers hide cryptocurrency mining malware in Adobe Flash updates
privacy, sicurezza, spionaggio, virus
::: manisha72617183

GoodFORM – Free and Open Redis modules
open source
::: GoodFORM

A Spectrum of Type Soundness and Performance
linguaggi di programmazione
::: Programming Research Laboratory

RIP Greg Stafford, a Fundamental Personage of the RPG Industry
games
::: Slashdot

For who have followed our evolution, we hope this announcement will be viewed as the next logical step for a company that is firmly committed to #Linux and #opensource
Linux
::: anBenedetti

TypedFastBitSet.js Speed-optimized BitSet implementation for modern browsers and JavaScript engines, uses typed arrays
linguaggi di programmazione
::: lemire

Today I learned that the reason many people pronounce SQL as “Sequel” is probably because that was the original name! SEQUEL = Structured English QUEry Language
storia
::: olebegemann

Started building wheels for all our Python packages
Python
::: _inesmontani

Top 10 Data Science Techniques – Useful overview
dati, raccolta
::: mariofusco

Fake news narrative seems to be providing cover for authoritarian regulation and orchestrated flagging of Facebook posts in Bangladesh. Everything is great
disinformazione, fake news, bufale | censura | politica
::: Mantzarlis

You Can Now Run Ubuntu 18.04 on Raspberry Pi 3 with BunsenLabs’ Helium Desktop
sistemi operativi
::: dcavedon

Silicon Valley’s Saudi Arabia Problem
politica | economia
::: Slashdot ::: FrankPasquale

Twitter Under Formal Investigation for How It Tracks Users in the GDPR Era
Twitter | privacy, sicurezza, spionaggio, virus
::: fabiochiusi ::: Slashdot

In Egypt a Facebook video denouncing sexual harassment can land you in jail for months or even years, under inhumane conditions — all in the name of “fighting fake news”
social media | politica
::: fabiochiusi

How do people perceive snaps? How well accepted are snaps in software development circles? Today, we’d like to share some of these figures
Ubuntu | applicazioni, programmi
::: cialunet

The Magic Leap Con
ditte | ad, pubblicità
::: Slashdot

#Facebook and #Twitter both launched massive purges of “misinformation” accounts in the last few days. In unison. They are separate companies, so either they coordinated with each other (bad), or they were both supplied with the same list by the government (worse)
social media | censura
::: OffGuardian0 ::: caitoz

Thieves and Geeks: Russian and Chinese Hacking Communities
privacy, sicurezza, spionaggio, virus
::: newsycombinator

#fakenews Odio e disinformazione sul web, la #Cgil è nel mirino
odio, razzismo, discriminazioni
::: sdallagata

Software Freedom Conservancy Shares Thoughts on Microsoft Joining Open Invention Network’s Patent Non-Aggression Pact
open source
::: Slashdot

Xorshift1024*, Xorshift1024+, Xorshift128+ and Xoroshiro128+ Fail Statistical Tests for Linearity (“We report that these scrambled generators systematically fail Big Crush (…)
bug
::: lemire

What’s the one useful piece of advice you got when learning a new/difficult programming language?
linguaggi di programmazione
::: manisha72617183

Design decisions for an unblockable journal Thank you: @racketlang @IPFSbot @greghendershott !
language Racket
::: Exospheric9

“scikit” is not an acceptable shorthand for “scikit-learn”
Python
::: jakevdp

An introduction to Ansible Operators in Kubernetes
programming, codice, snippet
::: cialunet

Go command and packages cheat sheet
linguaggi di programmazione
::: cialunet

If it was not clear enough: DO NOT buy @Huawei phones. NEVER
privacy, sicurezza, spionaggio, virus
::: fs0c131y

Running Linux containers as a non-root with Podman
applicazioni, programmi
::: cialunet

Important story from @sheeraf on what we Americans do to our own politics with bogus Facebook pages linked to clickbait websites — without Russian assistance
Facebook
::: ScottShaneNYT ::: jacopo_iacoboni

My post on Lisp. It’s basically a long explanation of that xkcd comic where Lisp is the key to understanding the structure of the universe. When and why did people start talking about Lisp that way?
inizia quasi lolloso ma poi si scoère un grande post 💥😁
storia | lisp(s)
::: TwoBitHistory

I love this. Can we have more tiny phones that just do Google maps and send text messages, thanks
dispositivi mobili
::: wesmckinn

More on Assange: Journalist @Cascabelito09, who previously published security cam footage from inside the Ecuadorean Embassy, says he has obtained a copy of the nine-page protocol that now governs Julian’s behavior inside the building
Web, Internet
::: razhael

Microsoft Co-Founder Paul Allen Dies of Cancer At Age 65
protagonisti
::: Slashdot ::: ComputerHistory ::: PaulGAllen ::: BerkeleySETI ::: JohnPaczkowski ::: Microsoft ::: IEEESpectrum ::: IEEESpectrum ::: Slashdot ::: nicolaiarocci

Microsoft To Disable TLS 1.0 and TLS 1.1 Support in Edge and Internet Explorer
à:web
::: Slashdot ::: tlsallthethings

Another awesome project in @racketlang
language Racket
::: pocmatos

99.7 Percent of Unique FCC Comments Favored Net Neutrality, Independent Analysis Finds
Web, Internet
::: Slashdot

Facebook To Ban Misinformation On Voting In Upcoming US Elections
Facebook | frodi | politica
::: Slashdot

Google is working on a new search engine code-named “Dragonfly” that will aid China’s effort to censor information from its citizenry. As a former Google engineer I wanted to share some information on what it’s like to be inside Google as these decisions are made
censura | Google
::: real_vijay ::: Slashdot

Former Google+ UI Designer Suggests Inept Management Played Role In Demise
Google | social media
::: Slashdot

An incredibly ambitious project to archive all software source code, *and* all commits, to preserve it for future historians
storia
::: _wilfredh ::: ShriramKMurthi

The New and Improved MacBook Keyboards Have the Same Old Problems
hardware
::: Slashdot

Cyber Tests Showed ‘Nearly All’ New Pentagon Weapons Vulnerable To Attack
privacy, sicurezza, spionaggio, virus
::: MartensJD

Is anyone interested in being paid to develop new features for SBCL / port it to a new platform? #lisp
lisp(s)
::: stylewarning ::: stylewarning

The Full Photoshop CC Is Coming To the iPad In 2019
il ‘puter è sempre più diverso, o sono troppo vecchio
applicazioni, programmi
::: Slashdot

EU Internet Censorship Will Censor the Whole World’s Internet
censura | copyright e brevetti
::: dcavedon

Il 97,1% delle famiglie intervistate (20 mila in tutto) ha almeno un apparecchio televisivo, ma solo il 22,1% un pc desktop, il 48,1% un portatile e il 26,4% un tablet
tecnologia
::: fabiochiusi

Tech suffers from lack of humanities, says Mozilla head
economia
::: fabiochiusi

piwheels: Speedy Python package installation for the Raspberry Pi
Python
::: cialunet

Il problema più grande di Facebook
privacy, sicurezza, spionaggio, virus
::: emenietti

Google To Charge Smartphone Makers For Google Play in Europe
Web, Internet
::: Slashdot

Journo friends (and everybody else, really): Please take the time to read this
novità | disinformazione, fake news, bufale
::: ThomNagy ::: fabiochiusi

When you are close to Seligenstadt in Germany, make sure you visit the Flipper- und Arcademuseum (@flipperarcade). Awesome place and great atmosphere!
storia | games
::: mikko

elementary OS 5 Juno is here. It’s more refined, more productive, and an even better platform for developers. We’ve majorly updated apps, made the desktop more productive with several new features, refined the overall look and feel, and a whole lot more
Linux distro
::: elementary

Easy apps with hyperHTML — 7, Testing
Web, Internet
::: pinguxx

Take part in the official Python Developers Survey 2018. Help us find out what the Python development world looks today and how it compares to last year
Python
::: ThePSF

New York Attorney General Expands Inquiry Into Net Neutrality Comments
Web, Internet
::: Slashdot

Facebook Could Use Data Collected From Its Portal In-Home Video Device To Target You With Ads
Facebook | ad, pubblicità
::: Slashdot ::: emenietti

Validating UTF-8 bytes (Java edition)
programming, codice, snippet
::: lemire

Time Protection: the Missing OS Abstraction
bug
::: graydon_pub

MongoDB Switches Up Its Open-Source License
open source
::: Slashdot

Qualcomm bets on 60-GHz Wi-Fi (broadcast at much higher frequencies than standard Wi-Fi), which could be used for high-speed downloads, or to sense the gestures of people in a room
Web, Internet
::: IEEESpectrum

Everyone put on your safety goggles: I’m about to use Racket units in anger
language Racket
::: lexi_lambda

Amazon Worker Pushes Bezos To Stop Selling Facial Recognition Tech To Police
privacy, sicurezza, spionaggio, virus
::: Slashdot ::: fabiochiusi

Alex Stamos era il meglio che Facebook potesse avere. Lui ci ha provato, a cambiare le cose. E ha perso
Facebook | privacy, sicurezza, spionaggio, virus
::: jacopo_iacoboni ::: MarietjeSchaake

I remember when a bug like this would define my whole week now I’m just like yeah everything was already ruined anyway I guess go ahead and just log into ssh why not
privacy, sicurezza, spionaggio, virus
::: 0xabad1dea

Due to this lack of focus on weapon systems cybersecurity, DOD likely has an entire generation of systems that were designed and built without adequately considering cybersecurity
privacy, sicurezza, spionaggio, virus
::: IEEESpectrum

Linux (x86) Exploit Development Series
sistemi operativi
::: b3h3m0th

Chrome 70 Arrives With Option To Disable Linked Sign-Ins, PWAs On Windows, and AV1 Decoder
Web, Internet
::: Slashdot

“GNU Tools Cauldron 2018” (Slides, Videos and Notes). Gathering of GNU tools developers, working on the GNU toolchain: GCC, GDB, binutils, runtimes, etc.
tools, componenti software
::: b3h3m0th

A new report from @projectinfolit found that college students aren’t confident in their ability to tell real news from fake news on social media
disinformazione, fake news, bufale
::: dpfunke

This explains the proliferation of scams targeting the elderly in Japan
frodi
::: fchollet

‘Do Not Track,’ the Privacy Tool Used By Millions of People, Doesn’t Do Anything
Web, Internet
::: Slashdot

Jack Dorsey on Twitter’s Role in Free Speech and Filter Bubbles
Twitter
::: fabiochiusi ::: fabiochiusi

We already have nice things, and other reasons not to write in-house ops tools
programming, codice, snippet
::: cialunet

Browsing the web with Min, a minimalist open source web browser
Web, Internet
::: cialunet

Facebook hack affected 3 million in Europe, creating the first big test for privacy regulation there
Facebook
::: emenietti

A significant new chapter in the Cambridge Analytica revelations. @JulietteGarside & @hilaryosborne have painstakingly investigated the company’s involvement with Henley & Partners & the sale of passports in the Caribbean. This is a whole new shitshow…
Facebook | frodi
::: carolecadwalla

Tech giants including Facebook, Google, Twitter and Mozilla have submitted plans to the European Commission outlining how they will abide by a code of practice against disinformation
disinformazione, fake news, bufale
::: fabiochiusi

Twitter spammed people’s phones with cryptic notifications
Twitter
::: emenietti

Twitter pubblica i dataset con più di 10 milioni di tweet, due milioni di immagini, gif e video, da parte di 3841 account dell’IRA, la troll factory russa (più altri 770 account iraniani) Bene. Ma la mia domanda è: perché solo ora?
Twitter
::: jacopo_iacoboni ::: jacopo_iacoboni

Net Neutrality’s End Will Let Power Eat the Internet
Web, Internet
::: anxiaostudio

Super stoked to share with everyone this project I’ve been working on. I’ve implemented a garbage collector as a Rust library
linguaggi di programmazione
::: withoutboats

Facebook plays an outsized role in our society and our economy. They have a social and financial responsibility to be transparent – that’s why we’re demanding independence and accountability in the company’s boardroom
Facebook
::: fabiochiusi

SSRN was recently acquired by… wait for it… Elsevier, which is a major opponent of free open-access scholarly publishing
open source
::: mattblaze

Sometimes I wish I had something in between a blog and twitter: something I could just post to stream-of-consciousness style as I play around with a new thing and learn about it, but without the extremely harsh length/formatting limitations of twitter
social media
::: lexi_lambda

Researcher Finds Simple Way of Backdooring Windows PCs and Nobody Notices for Ten Months
privacy, sicurezza, spionaggio, virus
::: Slashdot

My experiences building a URL shortener with OCaml and ReasonML
linguaggi di programmazione
::: keleshev

80/82 Strange Loop videos are now posted
programming, codice, snippet
::: strangeloop_stl

Functional Programming Fundamentals
programmazione funzionale
::: CompSciFact

Can we know for sure than any Java String object can be serialized as UTF-8 and UTF-16?
linguaggi di programmazione
::: lemire

If you find a bug, you should fix it right then & there
bug
::: RichRogersIoT

~10 million tweets that were potentially from state-backed operations by #Russia and #Iran are published by #Twitter, demonstrating the enormity of the misinformation campaigns of those two countries
Twitter | privacy, sicurezza, spionaggio, virus
::: W7VOA

Facebook Lured Advertisers By Inflating Ad-watch Times Up To 900 Percent
Facebook | ad, pubblicità
::: Slashdot ::: FrankPasquale

Trivial Authentication Bypass In Libssh Leaves Servers Wide Open
privacy, sicurezza, spionaggio, virus
::: Slashdot

wow, this is the smartest, most comprehensive take I’ve seen on the unsealed lawsuit against Facebook and its impact on media strategy
Facebook
::: jason_kint

How to Upgrade to Ubuntu 18.10 from Ubuntu 18.04 LTS
Ubuntu
::: dcavedon ::: dcavedon ::: dcavedon ::: cialunet

The Future of the Cloud Depends On Magnetic Tape
hardware
::: Slashdot

Vectorized Emulation: Hardware accelerated taint tracking at 2 trillion instructions per second
hardware
::: johnregehr

how did I only learn today that ARM64 processors can be set to ignore the contents of the top byte of pointers, and that ASAN can exploit this?
hardware
::: johnregehr

It turns out that Facebook could in fact use data collected from its Portal in-home video device to target you with ads
Facebook
::: kashhill

Dozens of advertisements removed from Facebook for being political ahead of the November midterm elections did not appear to express any political view
Facebook
::: fabiochiusi

I was contacted by this journalist and I gave my views on all the good work that it is been done in aviation security. Of course “good news” and reassurances in aviation security are not popular, therefore they are not covered and replaced by FUD
privacy, sicurezza, spionaggio, virus
::: AndreaBarisani

Stanford University: Why Online Voting Is a Danger to Democracy. Internet voting would be “a complete disaster.”
Web, Internet | politica
::: fpietrosanti

Being able to finally play with C# in a CLI REPL is awesome. Here I quickly wanted to make sure that a certain max value would fit into a long. It’s the small things
linguaggi di programmazione
::: nicolaiarocci ::: nicolaiarocci

Some neat Python stuff landing in Visual Studio in Q1 2019. Also nice much needed improvements to the test explorer and discovery service
#Py
::: nicolaiarocci

How reliable should we consider Google search results to be?
Google
::: _wilfredh

Superb article on building a real time rich text editor
programming, codice, snippet
::: _wilfredh

Announcing the Raspberry Pi TV HAT: a tiny board that lets you receive, view, and stream DVB-T2 television broadcasts with your Raspberry Pi
hardware
::: Raspberry_Pi

TimelineJS: An interactive, JavaScript timeline building tool
linguaggi di programmazione
::: cialunet

Alex Stamos, l’ex capo sicurezza Facebook, persona speciale, paragona quanto avvenuto (tra info ops e hack) nelle elezioni 2016 a Pearl Harbor e 9/11 (ma in Italia state tranquilli, i commentatori pro Casaleggio ci assicurano che non è successo niente)
Facebook | privacy, sicurezza, spionaggio, virus | politica
::: jacopo_iacoboni

Adding new definitions remains a meta-interpreter action. You have to do it yourself, in Python, and wash your hands afterward
programmazione funzionale | Python | linguaggi di programmazione
::: wallingf

Number of Robocalls Placed in the US Surged By 50 Percent in the First Half of This Year
web-bot
::: Slashdot

Last week, the WSJ editorial board endorsed a fascist for president of Brazil. This week, they’re calling tech workers “bullies” for organizing against the Pentagon’s weaponization of AI
protagonisti | media | economia
::: bentarnoff

U.S. making serious efforts to comply with EU data rules: EU officials
Web, Internet
::: fabiochiusi

This is critical. And btw, isn’t this a way to manipulate reality on mass scale and deceive readers (hey, the FB war room is such a big deal!) too? How do we call this? Automated tech reporting? Bot-like journalism? Platform trolling? Half-fake news?
Facebook
::: fabiochiusi

Protecting democracy from social media manipulation will require some sort of public policy oversight. Social media companies cannot be expected to regulate themselves
social media
::: IEEESpectrum

Microsoft Making More of the Windows 10 Built-In Apps Removable
sistemi operativi
::: Slashdot

Tech Companies Want to Run Our Cities
ditte
::: markhurst

OpenBSD 6.4 Released
sistemi operativi
::: Slashdot

Facebook Won’t End Fake News
Facebook
::: Jacobin

Internet Provider Groups Sue Vermont Over Net Neutrality Law
Web, Internet
::: Slashdot

iPhone’s New Parental Controls Block Sex Ed, Allow Violence and Racism
censura | odio, razzismo, discriminazioni
::: Slashdot

Canonical Launch Ubuntu User Statistics Website
Ubuntu
::: dcavedon

Twitter Publishes Archive of 10 Million Tweets From Russian, Iranian Bots
web-bot | Twitter
::: Slashdot

Weaponizing the Digital Influence Machine
privacy, sicurezza, spionaggio, virus
::: profcarroll

Ubuntu 18.10:Multi-cloud,new desktop theme & enhanced snap integration
Ubuntu
::: cialunet

Infographic: Snaps in numbers
applicazioni, programmi
::: cialunet

dig
tip, suggerimenti
::: b0rk

Only 13% of the world’s population enjoys a free press #OpenFuture
media
::: TheEconomist

Making sense of the name ‘Guix’ and its pronunciation
lisp(s)
::: beslayed

The slides from my LLVM talk on Memory Tagging
programming, codice, snippet
::: kayseesee

Must-read background on why centralization of all kinds is dangerous
Web, Internet

We now track and archive PyPI !
Python
::: SWHeritage

And a humble suggestion: I think security folks should start calling Attacker-Controlled Inputs/Data, “ACID”. This really helps developers grok that the thing you’re talking about is bad. And it’s way faster to say/write
Web, Internet | frodi
::: XenoKovah

really wish somebody had done a poll like this before a lot of good outlets fired their writers to pivot to video no one seems to want
Web, Internet
::: Millicentsomer

do Haskell and functional programmers tend to be less stupid than Java and object oriented programmers?
linguaggi di programmazione
::: philip_schwarz

How to use Pandoc to produce a research paper
applicazioni, programmi
::: cialunet

#EU #Copyright reform “highlight[s] a fundamental misunderstanding regarding creation in the digital era”, writes @RuthFlahertyUEA on the @uealaw blog. Read-up on how the #Article11 #LinkTax & #Article13 #CensorshipMachine are bad news! #SaveYourInternet
copyright e brevetti
::: FixIt_EU

Great to see the Python community converging on packaging, dependency management, and even project structure!
Python
::: _wilfredh

“Elements of Programming Style” – Brian Kernighan
programming, codice, snippet
::: b3h3m0th

ZDNet: Ubuntu Linux 18.10 arrives
Ubuntu
::: cialunet

Get ready for some more “platforms are biased against us” type of critique
Facebook
::: fabiochiusi ::: fabiochiusi ::: leftwing_it

Thinking about engineering education, our columnist recalls two high school courses that were especially valuable to him in the long run: plane geometry and typing
scuola, educazione
::: IEEESpectrum

Memory Barriers: a Hardware View for Software Hackers
hardware
::: b3h3m0th

Google App Suite Costs as Much as $40 Per Phone Under New EU Android Deal
applicazioni, programmi
::: Slashdot

GREAT NEWS: The new, important book by Yochai Benkler et al., “Network Propaganda: Manipulation, Disinformation, and Radicalization in American Politics”, is now available online
Web, Internet | privacy, sicurezza, spionaggio, virus | disinformazione, fake news, bufale
::: demartin

My Scheme and Functional Programming keynote video is up: From Scripting to Proving: Gradual Verification with a Scheme
language Racket
::: lambda_calculus

Creating an imagine like the one used in the Vertigo movie poster
Python
::: JohnDCook

WikiLeaks Founder Julian Assange Sues Ecuador For ‘Violating His Rights’
Web, Internet
::: Slashdot

In an Unprecedented Move, Apple CEO Tim Cook Calls For Bloomberg To Retract Its Chinese Spy Chip Story
disinformazione, fake news, bufale | privacy, sicurezza, spionaggio, virus
::: Slashdot ::: tomgara

Click Farms Are Gaming Apple’s Top Podcasts List
disinformazione, fake news, bufale | privacy, sicurezza, spionaggio, virus
::: Slashdot

Justice Dept. Accuses Russians of Interfering in Midterm Elections
privacy, sicurezza, spionaggio, virus | politica
::: fabiochiusi ::: jacopo_iacoboni ::: benimmo ::: IEEESpectrum

The FTC is examining whether we have a monopoly problem in this country. Here’s the problem: In its hearing on Monday, all the economists have ties to giant corporations
economia
::: eisingerj

Validating UTF-8 bytes using only 0.45 cycles per byte (AVX edition)
programming, codice, snippet
::: lemire

JS, like all languages, is just a tool… and we need to evolve our tools as our problems evolve
linguaggi di programmazione
::: AnjanaVakil

Yesterday I learned that C++ now has std::begin and std::end. I couldn’t figure out what they are good for, however
linguaggi di programmazione
::: lemire

In his first year of college at the University of Colorado, Boulder, Steve Wozniak racked up $50,000 in computing charges for one of his classes—five times more than the total class budget allowed
protagonisti
::: IEEESpectrum

Happy 14th Birthday, Ubuntu!
Ubuntu
::: dcavedon

Ajit Pai Killed Rules That Could Have Helped Florida Recover From Hurricane
Web, Internet
::: Slashdot

Update on Structured Concurrency
Python
::: vorpalsmith

When Twitter users hear out the other side, they become more polarized
Twitter
::: JoanBarata

Canonical and Ubuntu – user statistics
Ubuntu
::: cialunet

GitHut, a place to discover the languages on GitHub
linguaggi di programmazione
::: wallingf

Science and Technology links (October 20th, 2018)
novità
::: lemire

Semplificazioni (non trovate) e valori approssimati (molto buoni) per un test trigonometrico

Manisha Agarwal è mysteryosassay, dice di lei [s]ecurity engineer che si trova in (on?) Earth, until evacuation time, non so altro. Nome tipico (troppo) dell’India ma tanto non importa, anzi la privacy…

Manisha la seguo su Twitter e recentemente ha rilanciato un cinguettio di ∂an pd piponi che si presenta così: [m]y opinions are not my own. They’re beamed to me by aliens. Ah! (ha!) dove sono finito? No, tutto OK, Oakland e poi [u]sing an IBM Port-a-Punch I wrote my first program in Fortran in around 1978, uh! più vecchio di me (e molto migliore, ça va sans dire), guarda qua e qua. Nota solo per me: adesso lo followo; fatto.

Allora vengo al dunque: Dan dice di una lista di calcolatrici (roba vecchia del 2007, compilata da Mike Sebastian), in questo tweet.

Scorrendo il thread si vede che riguarda l’approssimazione e l’arrotondamento (facile, l’avevo pensato subito anch’io) e ci sono cose interessanti (almeno secondo me). Tante che sbagliano, alla grande. OK per gli arrotondamenti, anche se…[qui] da indagare.

Invece delle calcolatrici (e del telefono) voglio verificare con i linguaggi di programmazione che uso di solito, non tutti, qualcuno. Il test di Mike

Results from the evaluation of this equation in degrees mode:
arcsin (arccos (arctan (tan (cos (sin (9) ) ) ) ) )

usa i gradi; per comodità adotterò un valore in radianti. La conversione da

$ mx

(%i1) float(9 * %pi / 180);
(%o1)                         0.1570796326794896

da intendersi come valore approssimato; sapete che π la tira per le lunghe, anzi non la smette più; io cui userò il valore 0.16.

Di solito, e sta diventando sempre più di moda, uso Python:

$ py3
>>> from math import sin, cos, tan, asin, acos, atan
>>> asin(acos(atan(tan(cos(sin(0.16))))))
0.1599999999999997

Buono, anzi meraviglioso.

L’altro linguaggio che adesso va alla grande è (ebbene sì!) JavaScript:

$ node
> Math.asin(Math.acos(Math.atan(Math.tan(Math.cos(Math.sin(0.16))))))
0.1599999999999997

Quando devo fare un calcolo al volo io lancio Calc.

$ calc
; asin(acos(atan(tan(cos(sin(0.16))))))
	0.15999999999999999998

Anticamente, se non avevo la HP-11C a portata di mano, andavo su bc. bc non ha tutte le funzioni che mi servono; e quelle che ci sono hanno i nomi sbagliati (cioè non quelli usuali) ma si rimedia in un attimo: basta definire le funzioni in una libreria, un semplice file di testo, nel mio caso trig e caricarlo

pi = 4 * a(1)

define sin(x) {
  return (s(x));
}

define cos(x) {
  return c(x);
}

define tan(x) {
  if (c(x) != 0) {
    return (s(x) / c(x));
  return 1^20;
  }
}

define asin(x) {
  if (x == 1)
    return (pi / 2);
  return a(x / sqrt(1.0 - x^2));
}

define acos(x) {
  if (x == 0)
    return (pi / 2);
  return a(sqrt(1.0 - x^2) / x);
}

define atan(x) {
  return a(x)
}
$ bc -l trig
asin(acos(atan(tan(cos(sin(0.16))))))
.16000000000000000012

Non può certo mancare Racket (dovrei aggiornarlo, lo so):

$ rkt
Welcome to Racket v6.11.
> (asin (acos (atan (tan (cos (sin 0.16))))))
0.1599999999999997

E Maxima?

$ mx

(%i1) asin(acos(atan(tan(cos(sin(0.16))))));
(%o1)                         0.1599999999999995

Ma non tutto quello che volevo, non fa la semplificazione simbolica:

(%i1) trigsimp(asin(acos(atan(tan(cos(sin(a)))))));
(%o1)                       asin(acos(cos(sin(a))))

OK, atan(tan(a)) è a ma non va oltre

(%i2) trigsimp(%);
(%o2)                       asin(acos(cos(sin(a))))

e neanche per casi più semplici:

(%i3) trigsimp(asin(sin(a)));
(%o3)                            asin(sin(a))
(%i4) trigsimp(acos(cos(a)));
(%o4)                            acos(cos(a))
(%i5) trigsimp(atan(tan(a)));
                                      sin(a)
(%o5)                            atan(------)
                                      cos(a)
(%i6) trigsimp(%);
                                      sin(a)
(%o6)                            atan(------)
                                      cos(a)

Chissà se c’è qualcosa che non so?

Nota: uso aliases, si vede subito; non è necessario che le visualizzi, sono elementari.

Maxima – 88- Polinomi – funzioni e variabili – 2

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.268.

content (p_1, x_1, ..., x_n)
Returns a list whose first element is the greatest common divisor of the coefficients of the terms of the polynomial p_1 in the variable x_n (this is the content) and whose second element is the polynomial p_1 divided by the content.

(%i1) content (2*x*y + 4*x^2*y^2, y);
                                          2
(%o1)                          [2 x, 2 x y  + y]

denom (expr)
Returns the denominator of the rational expression expr. See also num.

(%i2) g1:(x+2)*(x+1)/((x+3)^2);
                                (x + 1) (x + 2)
(%o2)                           ---------------
                                          2
                                   (x + 3)
(%i3) denom(g1);
                                          2
(%o3)                              (x + 3)
(%i4) g2:sin(x)/10*cos(x)/y;
                                 cos(x) sin(x)
(%o4)                            -------------
                                     10 y
(%i5) denom(g2);
(%o5)                                10 y

divide (p_1, p_2, x_1, ..., x_n)
computes the quotient and remainder of the polynomial p_1 divided by the polynomial p_2, in a main polynomial variable, x_n. The other variables are as in the ratvars function. The result is a list whose first element is the quotient and whose second element is the remainder.

(%i6) divide (x + y, x - y, x);
(%o6)                              [1, 2 y]
(%i7) divide (x + y, x - y);
(%o7)                             [- 1, 2 x]

Note that y is the main variable in the second example.

eliminate ([eqn_1, ..., eqn_n], [x_1, ..., x_k])
Eliminates variables from equations (or expressions assumed equal to zero) by taking successive resultants. This returns a list of n - k expressions with the k variables x_1, ..., x_k eliminated. First x_1 is eliminated yielding n - 1 expressions, then x_2 is eliminated, etc. If k = n then a single expression in a list is returned free of the variables x_1, ..., x_k. In this case solve is called to solve the last resultant for the last variable.

(%i8) expr1: 2*x^2 + y*x + z;
                                             2
(%o8)                           z + x y + 2 x
(%i9) expr2: 3*x + 5*y - z - 1;
(%o9)                        (- z) + 5 y + 3 x - 1
(%i10) expr3: z^2 + x - y^2 + 5;
                                 2    2
(%o10)                          z  - y  + x + 5
(%i11) eliminate ([expr3, expr2, expr1], [y, z]);
              8         7         6          5          4         3         2
(%o11) [7425 x  - 1170 x  + 1299 x  + 12076 x  + 22887 x  - 5154 x  - 1291 x
                                                              + 7688 x + 15376]

ezgcd (p_1, p_2, p_3, ...)
Returns a list whose first element is the greatest common divisor of the polynomials p_1, p_2, p_3, ... and whose remaining elements are the polynomials divided by the greatest common divisor. This always uses the ezgcd algorithm.

See also gcd, gcdex, gcdivide, and poly_gcd.

(%i12) p1 : 6*x^3-17*x^2+14*x-3;
                               3       2
(%o12)                      6 x  - 17 x  + 14 x - 3
(%i13) p2 : 4*x^4-14*x^3+12*x^2+2*x-3;
                           4       3       2
(%o13)                  4 x  - 14 x  + 12 x  + 2 x - 3
(%i14) p3 : -8*x^3+14*x^2-x-3;
                                 3        2
(%o14)                     (- 8 x ) + 14 x  - x - 3
(%i15) gcd(p1, gcd(p2, p3));
(%o15)                              2 x - 3
(%i16) ezgcd(p1, p2, p3);
                      2               3      2            2
(%o16)   [2 x - 3, 3 x  - 4 x + 1, 2 x  - 4 x  + 1, (- 4 x ) + x + 1]

facexpand
Default value: true.

facexpand controls whether the irreducible factors returned by factor are in expanded (the default) or recursive (normal CRE) form.

factor (expr)
factor (expr, p)
Factors the expression expr, containing any number of variables or functions, into factors irreducible over the integers. factor(expr, p) factors expr over the field of rationals with an element adjoined whose minimum polynomial is p.

factor uses ifactors function for factoring integers.

factorflag if false suppresses the factoring of integer factors of rational expressions.

dontfactor may be set to a list of variables with respect to which factoring is not to occur. (It is initially empty). Factoring also will not take place with respect to any variables which are less important (using the variable ordering assumed for CRE form) than those on the dontfactor list.

savefactors if true causes the factors of an expression which is a product of factors to be saved by certain functions in order to speed up later factorizations of expressions containing some of the same factors.

berlefact if false then the Kronecker factoring algorithm will be used otherwise the Berlekamp algorithm, which is the default, will be used.

intfaclim if true Maxima will give up factorization of integers if no factor is found after trial divisions and Pollard’s rho method. If set to false (this is the case when the user calls factor explicitly), complete factorization of the integer will be attempted.

The user’s setting of intfaclim is used for internal calls to factor. Thus, intfaclim may be reset to prevent Maxima from taking an inordinately long time factoring large integers.

See also collectterms.

(%i17) factor (2^63 - 1);
                           2
(%o17)                    7  73 127 337 92737 649657
(%i18) factor (-8*y - 4*x + z^2*(2*y + x));
(%o18)                     (2 y + x) (z - 2) (z + 2)
(%i19) -1 - 2*x - x^2 + y^2 + 2*x*y^2 + x^2*y^2;
                       2  2        2    2    2
(%o19)                x  y  + 2 x y  + y  - x  - 2 x - 1
(%i20) block ([dontfactor: [x]], factor (%/36/(1 + 2*y + y^2)));
                              2
                            (x  + 2 x + 1) (y - 1)
(%o20)                      ----------------------
                                  36 (y + 1)
(%i21) factor (1 + %e^(3*x));
                             x         2 x     x
(%o21)                    (%e  + 1) (%e    - %e  + 1)
(%i22) factor (1 + x^4, a^2 - 2);
                           2              2
(%o22)                   (x  - a x + 1) (x  + a x + 1)
(%i23) factor (-y^2*z^2 - x*z^2 + x^2*y^2 + x^3);
                              2
(%o23)                    - (y  + x) (z - x) (z + x)
(%i24) (2 + x)/(3 + x)/(b + x)/(c + x)^2;
                                    x + 2
(%o24)                     ------------------------
                                                  2
                           (x + 3) (x + b) (x + c)
(%i25) ratsimp (%);
                 4                  3     2                       2
(%o25) (x + 2)/(x  + (2 c + b + 3) x  + (c  + (2 b + 6) c + 3 b) x
                                                         2                   2
                                             + ((b + 3) c  + 6 b c) x + 3 b c )
(%i26) partfrac (%, x);
            2                   4                  3     2              2
(%o26) (- (c  - 4 c - b + 6)/((c  + ((- 2 b) - 6) c  + (b  + 12 b + 9) c
          2                 2                             c - 2
 + ((- 6 b ) - 18 b) c + 9 b ) (x + c))) - -----------------------------------
                                             2                               2
                                           (c  + ((- b) - 3) c + 3 b) (x + c)
                         b - 2
 + -------------------------------------------------
             2             2       3      2
   ((b - 3) c  + (6 b - 2 b ) c + b  - 3 b ) (x + b)
                         1
 - ----------------------------------------------
             2
   ((b - 3) c  + (18 - 6 b) c + 9 b - 27) (x + 3)
(%i27) map ('factor, %);
               2
              c  - 4 c - b + 6                  c - 2
(%o27) (- -------------------------) - ------------------------
                 2        2                                   2
          (c - 3)  (c - b)  (x + c)    (c - 3) (c - b) (x + c)
                                     b - 2                        1
                          + ------------------------ - ------------------------
                                           2                          2
                            (b - 3) (c - b)  (x + b)   (b - 3) (c - 3)  (x + 3)
(%i28) ratsimp ((x^5 - 1)/(x - 1));
                              4    3    2
(%o28)                       x  + x  + x  + x + 1
(%i29) subst (a, x, %);
                              4    3    2
(%o29)                       a  + a  + a  + a + 1
(%i30) factor (%th(2), %);
                              2        3        3    2
(%o30)          (x - a) (x - a ) (x - a ) (x + a  + a  + a + 1)
(%i31) factor (1 + x^12);
                              4        8    4
(%o31)                      (x  + 1) (x  - x  + 1)
(%i32) factor (1 + x^99);
                 2            6    3
(%o32) (x + 1) (x  - x + 1) (x  - x  + 1)
   10    9    8    7    6    5    4    3    2
 (x   - x  + x  - x  + x  - x  + x  - x  + x  - x + 1)
   20    19    17    16    14    13    11    10    9    7    6    4    3
 (x   + x   - x   - x   + x   + x   - x   - x   - x  + x  + x  - x  - x  + x
        60    57    51    48    42    39    33    30    27    21    18    12
 + 1) (x   + x   - x   - x   + x   + x   - x   - x   - x   + x   + x   - x
    9    3
 - x  + x  + 1)

Maxima – 87- Polinomi – funzioni e variabili – 1

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.265.

algebraic
Default value: false.

algebraic must be set to true in order for the simplification of algebraic integers to take effect.

berlefact
Default value: true.

When berlefact is false then the Kronecker factoring algorithm will be used otherwise the Berlekamp algorithm, which is the default, will be used.

bezout (p1, p2, x)
an alternative to the resultant command. It returns a matrix. determinant of this matrix is the desired resultant.

(%i1) bezout(a*x+b, c*x^2+d, x);
                                [ b c  - a d ]
(%o1)                           [            ]
                                [  a     b   ]
(%i2) determinant(%);
                                   2      2
(%o2)                             a  d + b  c
(%i3) resultant(a*x+b, c*x^2+d, x);
                                   2      2
(%o3)                             a  d + b  c

bothcoef (expr, x)
Returns a list whose first member is the coefficient of x in expr (as found by ratcoef if expr is in CRE form otherwise by coeff) and whose second member is the remaining part of expr. That is, [A, B] where expr = A*x + B.

(%i4) islinear (expr, x) := block ([c],
                           c: bothcoef (rat (expr, x), x),
                           is (freeof (x, c) and c[1] # 0))$

(%i5) islinear ((r^2 - (x - r)^2)/x, x);
(%o5)                                true

coeff (expr, x, n)
coeff (expr, x)
Returns the coefficient of x^n in expr, where expr is a polynomial or a monomial term in x. Other than ratcoef coeff is a strictly syntactical operation and will only find literal instances of x^n in the internal representation of expr.

coeff(expr, x^n) is equivalent to coeff(expr, x, n). coeff(expr, x, 0) returns the remainder of expr which is free of x. If omitted, n is assumed to be 1.

x may be a simple variable or a subscripted variable, or a subexpression of expr which comprises an operator and all of its arguments.

It may be possible to compute coefficients of expressions which are equivalent to expr by applying expand or factor. coeff itself does not apply expand or factor or any other function.

coeff distributes over lists, matrices, and equations.

See also ratcoef.

coeff returns the coefficient x^n in expr.

(%i6) coeff (b^3*a^3 + b^2*a^2 + b*a + 1, a^3);
                                       3
(%o6)                                 b

coeff(expr, x^n) is equivalent to coeff(expr, x, n).

(%i7) coeff (c[4]*z^4 - c[3]*z^3 - c[2]*z^2 + c[1]*z, z, 3);
(%o7)                                - c
                                        3
(%i8) coeff (c[4]*z^4 - c[3]*z^3 - c[2]*z^2 + c[1]*z, z^3);
(%o8)                                - c
                                        3

coeff(expr, x, 0) returns the remainder of expr which is free of x.

(%i9) coeff (a*u + b^2*u^2 + c^3*u^3, b, 0);
                                   3  3
(%o9)                             c  u  + a u

x may be a simple variable or a subscripted variable, or a subexpression of expr which comprises an operator and all of its arguments.

(%i10) coeff (h^4 - 2*%pi*h^2 + 1, h, 2);
(%o10)                              - 2 %pi
(%i11) coeff (v[1]^4 - 2*%pi*v[1]^2 + 1, v[1], 2);
(%o11)                              - 2 %pi
(%i12) coeff (sin(1+x)*sin(x) + sin(1+x)^3*sin(x)^3, sin(1+x)^3);
                                       3
(%o12)                              sin (x)
(%i13) coeff ((d - a)^2*(b + c)^3 + (a + b)^4*(c - d), a + b, 4);
(%o13)                               c - d

coeff itself does not apply expand or factor or any other function.

(%i14) coeff (c*(a + b)^3, a);
(%o14)                                 0
(%i15) expand (c*(a + b)^3);
                        3          2        2        3
(%o15)                 b  c + 3 a b  c + 3 a  b c + a  c
(%i16) coeff (%, a);
                                       2
(%o16)                              3 b  c
(%i17) coeff (b^3*c + 3*a*b^2*c + 3*a^2*b*c + a^3*c, (a + b)^3);
(%o17)                                 0
(%i18) factor (b^3*c + 3*a*b^2*c + 3*a^2*b*c + a^3*c);
                                         3
(%o18)                            (b + a)  c
(%i19) coeff (%, (a + b)^3);
(%o19)                                 c

coeff distributes over lists, matrices, and equations.

(%i20) coeff ([4*a, -3*a, 2*a], a);
(%o20)                            [4, - 3, 2]
(%i21) coeff (matrix ([a*x, b*x], [-c*x, -d*x]), x);
                                 [  a    b  ]
(%o21)                           [          ]
                                 [ - c  - d ]
(%i22) coeff (a*u - b*v = 7*u + 3*v, u);
(%o22)                               a = 7

AI, innovazioni e blockchain – 44

Ubuntu nuovo, da aggiornare, appena recupero il ritardo, no prima ma intanto ecco qua 😁

Il Monviso fotografato da Bergamo – Valerio Minato

NIST “do you need a blockchain flowchart”
blockchain e crypto*
::: justincormack

The Cryptocurrency Industry is ‘On the Brink of an Implosion’, Research Says
blockchain e crypto*
::: Slashdot

Don’t look now, but @BostonDynamics’ robot Atlas is back. And now it can do parkour
robots
::: WIRED

AI has already begun rewiring warfare, even if it hasn’t (yet) taken the form of literal Terminators. There are less cinematic but equally scary ways to weaponize AI. You don’t need algorithms pulling the trigger for algorithms to play a dangerous role
artificial intelligence
::: FrankPasquale

The US Military Wants To Teach AI Some Basic Common Sense
artificial intelligence
::: Slashdot

Researchers Develop 3D Printed Objects That Can Track and Store How They Are Used
innovazioni, futuro
::: Slashdot

I just don’t know what to make of this blockchain crowd. They are either complete lunatics, or they will change the world
blockchain e crypto*
::: marcelsalathe

The UK Invited a Robot To ‘Give Evidence’ In Parliament For Attention
robots
::: Slashdot

Google AI Claims 99 Percent Accuracy In Metastatic Breast Cancer Detection
artificial intelligence
::: Slashdot

L’involontaria ed inconsapevole ironia del titolo di questo articolo è stupenda
blockchain e crypto*
::: stefanoepifani

Samsung Says Its Foldable Phone Will Be a Tablet You Can Put In Your Pocket
dispositivi mobili
::: Slashdot ::: Slashdot

AI ethics and human rights: where we need to go
artificial intelligence
::: sherifea

Far morire i bitcoin dovrebbe essere un dovere civico: per l’ambiente e l’energia assurda che consumano, non solo per l’economia (e la politica malamente finanziata)
blockchain e crypto*
::: jacopo_iacoboni

DARPA, the arm of the Pentagon that gave us drones and the internet, is researching technology to let soldiers download memories to their brains
innovazioni, futuro
::: emenietti

If you’ve always wanted to play around with quantum computing, here’s your chance
quantum computing
::: IEEESpectrum

Start talking about where data come from, what is being measured and why, who is labelling the data, and how AI is only as good as the data it’s trained on
dati, raccolta | artificial intelligence
::: andrewthesmart

Rivals ARM and Intel Make Peace To Secure Internet of Things
Internet of things
::: Slashdot

Will China beat the United States to develop the best and brightest #AI?
Former Head of Google China Foresees an AI Crisis—and Proposes a Solution
artificial intelligence
::: IEEESpectrum

Blockchain has been heralded as a potential panacea for everything from poverty and famine to cancer
blockchain e crypto*
::: fabiochiusi

Jeff Bezos Predicts We’ll Have 1 Trillion Humans in the Solar System, and Blue Origin Wants To Help Get Us There
protagonisti | innovazioni, futuro
::: Slashdot

Most Americans Can’t Tell the Difference Between a Social Media Bot and A Human, Study Finds
web-bot | social media
::: Slashdot

Welcome to the World of Tomorrow
tutto il thread
storia | innovazioni, futuro
::: adrianhon

MIT today announced a new $1 billion commitment to address the global opportunities and challenges presented by the prevalence of computing and the rise of artificial intelligence
artificial intelligence
::: fabiochiusi

Sony Tries Using Blockchain Tech For Next-Gen DRM
blockchain e crypto*
::: Slashdot

1954

Eta Compute says it has made the first commercial low-power #AI chip capable of learning on its own by using spiking neural networks
machine learning
::: IEEESpectrum ::: IEEESpectrum ::: IEEESpectrum

Rolls-Royce Wants To Fill the Seas With Self-Sailing Ships
innovazioni, futuro
::: Slashdot

Stephen Hawking Warns That AI and ‘Superhumans’ Could Wipe Humanity; Says There’s No God in Posthumous Book
artificial intelligence | innovazioni, futuro
::: Slashdot

Nobel-prize winner Rommer on innovation and higher education
innovazioni, futuro
::: lemire

Google Maps Adds EV Charging Station Info
innovazioni, futuro
::: Slashdot

This research marks the first time that any type of #AI has been incorporated into a MEMs device
artificial intelligence
::: IEEESpectrum

Optimism about the potential benefits of AI has dropped significantly among those who are actually developing AI systems
artificial intelligence
::: FrankPasquale

We started just with a business plan, a financial model and kind of a hope that our $19 million that we raised from—you know—friends and family would someday, maybe create a little company that could own a few buildings
una storia di innovazione fu8ori dal comune; ispirazionale?
innovazioni, futuro
::: danking00

The AI ethics body formed by five of the largest US corporations has expanded to include its first Chinese member, the search firm Baidu
artificial intelligence
::: fabiochiusi

Some Electric Car Drivers Might Spew More CO2 Than Diesel Cars, New Research Shows
innovazioni, futuro
::: Slashdot

Finally, all of the world’s coolest and most interesting #Robots are in one place: robots.ieee.org. Congrats to @robotsapp on launch day!! 🤖❤️🤖❤️🤖
robots
::: newsbeagle

In @qz, Personal Robots group head @cynthiabreazeal looks into the future of humanistic, social robots—beyond Rosie, Skynet, and R2D2
robots
::: medialab

Someone Used a Deep Learning AI To Perfectly Insert Harrison Ford Into “Solo: A Star Wars Story”
deep learning
::: Slashdot

Alum @strausfeld is working to create a new #dataviz paradigm: a VR-explorable, 3D map of network connections—starting with a timeline of women’s history
virtual reality
::: medialab

Driverless Car Hype Gives Way To E-Scooter Mania Among Technorati
automazione | innovazioni, futuro
::: Slashdot

Former Top Waymo Engineer Altered Code To Go on ‘Forbidden Routes’, Report Says
automazione
::: Slashdot

Neutrino is a new bitcoin light client that enables Lightning to run on mobile phones
blockchain e crypto*
::: lightning

$194 million of Bitcoin was moved today for only $0.10
blockchain e crypto* | Web, Internet
::: ColeKennelly

The 5th Wave of computing will make traditional ways of measuring computing power obsolete, says the CEO of Arm
innovazioni, futuro
::: IEEESpectrum

Chinese City ‘Plans To Launch Artificial Moon To Replace Streetlights’
innovazioni, futuro
::: Slashdot

Governing Artificial Intelligence | Data & Society
artificial intelligence | dati, raccolta
::: Dunja_Mijatovic

I just posted “L’intelligenza artificiale per studiare il plancton” on Reddit
artificial intelligence
::: RadioProzac

You’ve heard about the ethics of #AI, but have you thought about the impact of AI on human rights? A team from @BKCHarvard considered the risks & benefits of AI on human rights in this new report
artificial intelligence
::: BKCHarvard

La copertina di SICP

Aggiornamento, correzioni: vedi in fondo, grazie a Luis Souto Graña.

Per me ha cominciato Michael con questo tweet. Un umanista ma che segue anche cose —ahemmm…— interessanti. No, aspetta Professor of Digital Humanities, chissà cos’è, mi devo aggiornare 😐 Non gli è sfuggito 0b10 (TwoBit) che si occupa di storia, ah! tout se tient.

Michael Piotrowski cita Raimondo Lullo, questo qui e qui.

OK, siamo un po’ fuori dalla programmazione corrente ma oggi mi va di  indagare  sbirciarci dentro, ecco 🤩

Di TwoBit me n’ero già accorto e l’ho anche messo nella rassegna Visto nel Web ma –come detto– approfondisco. Anche perché c’è xkcd, McCarthy, l’inizio del tutto e cose solo sentite di seconda mano (e seconda lingua) quando ero giovane, complice Douglas Hofstadter, quello di GEB (che, strano, non viene citato, la mia storia è solo mia).

Bravo Luis Souto Graña (spectrumgomas) che ci illumina: They aren’t a wizard and a woman. They are Hermes Trismegistus and Ramon Llull.
Luis ogni volta che lo ritrovo su Twitter mi sento in colpa per via di Mastodon, Guile e adesso scopro anche G+ 😐

Kudos @ Benjamin Breen che ne sa di queste cose, la salamandra finora nessuno l’ha citata, nella copertina di SICP non c’è. Uh! prof anche lui, Assistant professor @UCSC working on the history of drugs, technology, and globalization. Quante cose ci sono tra il cielo e la terra che –OK, inizio cit. personalizzata. Avendo tempo il suo blog, Res Obscura

+++Brekki-Niù+++ scopro proprio ora che 0b10 ha un nome (Sinclair Target), un about esplicativo e un altro account Twitter, poco usato ma sexyassay. Futuro prof anche lui 🤩
Sinclair rivela che con il misticismo Lisp ci si può spingere ben oltre (vedetevelo voi, io non ho il coraggio).
Ma risponde Luis, è uno scherzo, è Athanasius Kircher e l’Edipus AEgypticus. E, sempre nello stesso thread entra Matthew Alhonte controllate la copertina del libro (l’ultimo citato, non il SICP); uh! analisi bayesiana, fuggo via.

Tornando alla salamandra arriva Vriese – Hans Vredeman de Vries.

E quando il gioco si fa duro (inizio.cit) arriva Pancicz Godek, apre un altro filone, con altri commentatori.

Qui smetto perché –confesso– mi sono un po’ perso, anzi tanto, completamente. E se qualcuno ha letto anche lui 😐 Ma terrei a far sapere che posso smettere quando voglio 😐 probabilmente 😐 Ma davvero ci tenevo tanto a metterlo giù per iscritto, metti che quando sarò vecchio… 😐

Aggiornamento: Luis @spectrumgomas mi fa notare che ho fatto un po’ di confusione, saltata l’attribuzione a Arno Bosse (da followare, impo), e i riferimenti classici 😐.

In particolare Plinio, questo tweet non l’avevo visto, ha ragione Luis devo fare più attenzione.

E quindi il Lisp (Scheme): the dual nature of knowledge: dangerous […], but also enlightening […]; sì il Lisp è diverso, migliore –anche se può essere pericoloso (p.es. a volte mi guardano male se lo nomino).

Maxima – 86- Polinomi – introduzione

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.265.

Polynomials are stored in Maxima either in General Form or as Canonical Rational Expressions (CRE) form. The latter is a standard form, and is used internally by operations such as factor, ratsimp, and so on.

Canonical Rational Expressions constitute a kind of representation which is especially suitable for expanded polynomials and rational functions (as well as for partially factored polynomials and rational functions when RATFAC is set to true).

In this CRE form an ordering of variables (from most to least main) is assumed for each expression. Polynomials are represented recursively by a list consisting of the main variable followed by a series of pairs of expressions, one for each term of the polynomial. The first member of each pair is the exponent of the main variable in that term and the second member is the coefficient of that term which could be a number or a polynomial in another variable again represented in this form. Thus the principal part of the CRE form of 3*X^2-1 is (X 2 3 0 -1) and that of 2*X*Y+X-3 is (Y 1 (X 1 2) 0 (X 1 1 0 -3)) assuming Y is the main variable, and is (X 1 (Y 1 2 0 1) 0 -3) assuming X is the main variable.

“Main”-ness is usually determined by reverse alphabetical order. The “variables” of a CRE expression needn’t be atomic. In fact any subexpression whose main operator is not §§+ – * / or ^ with integer power will be considered a “variable” of the expression (in CRE form) in which it occurs. For example the CRE variables of the expression X+SIN(X+1)+2*SQRT(X)+1 are X, SQRT(X), and SIN(X+1). If the user does not specify an ordering of variables by using the RATVARS function Maxima will choose an alphabetic one. In general, CRE’s represent rational expressions, that is, ratios of polynomials, where the numerator and denominator have no common factors, and the denominator is positive.

The internal form is essentially a pair of polynomials (the numerator and denominator) preceded by the variable ordering list. If an expression to be displayed is in CRE form or if it contains any subexpressions in CRE form, the symbol /R/ will follow the line label. See the RAT function for converting an expression to CRE form. An extended CRE form is used for the representation of Taylor series. The notion of a rational expression is extended so that the exponents of the variables can be positive or negative rational numbers rather than just positive integers and the coefficients can themselves be rational expressions as described above rather than just polynomials. These are represented internally by a recursive polynomial form which is similar to and is a generalization of CRE form, but carries additional information such as the degree of truncation. As with CRE form, the symbol /T/ follows the line label of such expressions.

Maxima – 85- Files di input e output – funzioni e variabili per l’output del Fortran

Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.262.

fortindent
Default value: 0.
fortindent controls the left margin indentation of expressions printed out by the fortran command. 0 gives normal printout (i.e., 6 spaces), and positive values will causes the expressions to be printed farther to the right.

fortran (expr)
Prints expr as a Fortran statement. The output line is indented with spaces. If the line is too long, fortran prints continuation lines. fortran prints the exponentiation operator ^ as **, and prints a complex number a + b %i in the form (a,b).

expr may be an equation. If so, fortran prints an assignment statement, assigning the right-hand side of the equation to the left-hand side. In particular, if the right-hand side of expr is the name of a matrix, then fortran prints an assignment statement for each element of the matrix.

If expr is not something recognized by fortran, the expression is printed in grind format without complaint. fortran does not know about lists, arrays, or functions.

fortindent controls the left margin of the printed lines. 0 is the normal margin (i.e., indented 6 spaces). Increasing fortindent causes expressions to be printed further to the right.

When fortspaces is true, fortran fills out each printed line with spaces to 80 columns.

fortran evaluates its arguments; quoting an argument defeats evaluation. fortran always returns done.

See also the function f90, for printing one or more expressions as a Fortran 90 program.

(%i1) expr: (a + b)^12$

(%i2) fortran (expr);
      (b+a)**12
(%o2)                                done
(%i3) fortran ('x=expand (expr));
      x = b**12+12*a*b**11+66*a**2*b**10+220*a**3*b**9+495*a**4*b**8+792
     1   *a**5*b**7+924*a**6*b**6+792*a**7*b**5+495*a**8*b**4+220*a**9*b
     2   **3+66*a**10*b**2+12*a**11*b+a**12
(%o3)                                done
(%i4) fortran ('x=7+5*%i);
      x = (7,5)
(%o4)                                done
(%i5) fortran ('x=[1,2,3,4]);
      x(1) = 1
      x(2) = 2
      x(3) = 3
      x(4) = 4
(%o5)                                done
(%i6) f(x) := x^2$

(%i7) fortran (f);
      f
(%o7)                                done

fortspaces
Default value: false.

When fortspaces is true, fortran fills out each printed line with spaces to 80 columns.

Averlo avuto 30+ anni orsono! Per esempio ho un integrale di quelli non banali mi faccio calcolare l’espressione pronta per copiarla e inserirla nel mio programma. Oggi nessuno conosce più il Fortran, tranne me (io) 😐