Re: [sage-support] Re: Isolating real roots of exact univariate polynomial
Just for the record, I checked these with the recent Sage beta (8.1.beta9), and everything works, no errors. On Friday, February 18, 2011 at 4:07:38 PM UTC, D. S. McNeil wrote: > > A somewhat simpler test case, which I think preserves the qualitative > issue: > > sage: from sage.rings.polynomial.real_roots import real_roots > sage: > sage: x = polygen(QQ) > sage: f = 2503841067*x^13 - 15465014877*x^12 + 37514382885*x^11 - > 44333754994*x^10 + 24138665092*x^9 - 2059014842*x^8 - 3197810701*x^7 + > 803983752*x^6 + 123767204*x^5 - 26596986*x^4 - 2327140*x^3 + 75923*x^2 > + 7174*x + 102 > sage: len(real_roots(f)), len(real_roots(f,strategy='warp')) > (11, 13) > sage: > sage: [map(float,r[0]) for r in real_roots(f)] > [[-0.28173828138369572, -0.23901367199914603], [-0.19628906261459633, > -0.15356445323004664], [-0.078796386807084673, -0.073455810634015961], > [-0.036071777422534979, -0.030731201249466267], > [-0.025390625076397555, 0.017333984308152139], [0.060058593692701834, > 0.10278320307725153], [0.14550781246180122, 0.23095703123090061], > [0.57275390625, 0.615478515625], [0.658203125, 0.76618289947509766], > [1.375, 1.4375], [1.5, 2.0]] > sage: [map(float,r[0]) for r in real_roots(f,strategy='warp')] > [[-0.1, -0.23076923076923075], [-0.18518518518518517, > -0.14285714285714285], [-0.10344827586206896, -0.06], > [-0.049180327868852458, -0.032258064516129031], > [-0.023997, -0.015873015873015872], [0.032258064516129031, > 0.06], [0.14285714285714285, 0.23076923076923075], > [0.59998, 0.64102564102564097], [0.72972972972972971, > 0.75342465753424648], [0.95373241116145957, 0.95396541443053062], > [0.95419847328244267, 0.96923076923076923], [1.2857142857142856, > 1.4615384615384615], [1.6665, 3.0]] > > > Doug > > -- > Department of Earth Sciences > University of Hong Kong > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Isolating real roots of exact univariate polynomial
A somewhat simpler test case, which I think preserves the qualitative issue: sage: from sage.rings.polynomial.real_roots import real_roots sage: sage: x = polygen(QQ) sage: f = 2503841067*x^13 - 15465014877*x^12 + 37514382885*x^11 - 44333754994*x^10 + 24138665092*x^9 - 2059014842*x^8 - 3197810701*x^7 + 803983752*x^6 + 123767204*x^5 - 26596986*x^4 - 2327140*x^3 + 75923*x^2 + 7174*x + 102 sage: len(real_roots(f)), len(real_roots(f,strategy='warp')) (11, 13) sage: sage: [map(float,r[0]) for r in real_roots(f)] [[-0.28173828138369572, -0.23901367199914603], [-0.19628906261459633, -0.15356445323004664], [-0.078796386807084673, -0.073455810634015961], [-0.036071777422534979, -0.030731201249466267], [-0.025390625076397555, 0.017333984308152139], [0.060058593692701834, 0.10278320307725153], [0.14550781246180122, 0.23095703123090061], [0.57275390625, 0.615478515625], [0.658203125, 0.76618289947509766], [1.375, 1.4375], [1.5, 2.0]] sage: [map(float,r[0]) for r in real_roots(f,strategy='warp')] [[-0.1, -0.23076923076923075], [-0.18518518518518517, -0.14285714285714285], [-0.10344827586206896, -0.06], [-0.049180327868852458, -0.032258064516129031], [-0.023997, -0.015873015873015872], [0.032258064516129031, 0.06], [0.14285714285714285, 0.23076923076923075], [0.59998, 0.64102564102564097], [0.72972972972972971, 0.75342465753424648], [0.95373241116145957, 0.95396541443053062], [0.95419847328244267, 0.96923076923076923], [1.2857142857142856, 1.4615384615384615], [1.6665, 3.0]] Doug -- Department of Earth Sciences University of Hong Kong -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Isolating real roots of exact univariate polynomial
Just for the record. The problem seems to be related to RIF. For the inexact ring RR, it works: len(e.roots(ring=RR)) 13 len(e.real_roots()) 13 numeric approximations of the two missing roots are: 0.953956769342757, 0.957223630414975 This pair of roots is exactly the pair of most close roots among all. So it seems that a sign change is not detected. On Feb 18, 3:41 pm, zteitler wrote: > I was not sufficiently careful in posting my polynomial e(x) and > apparently some bad line breaks and spaces were introduced. This reply > is to post a properly-wrapped copy of the polynomial. > > Zach Teitler -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Isolating real roots of exact univariate polynomial
I was not sufficiently careful in posting my polynomial e(x) and apparently some bad line breaks and spaces were introduced. This reply is to post a properly-wrapped copy of the polynomial. Zach Teitler 594813163982683595176185452130468519129644968918377817372539082858201843 585765189183318929483455064684025872227145205648818497483157266780841943 775316670899354303864732762372768687262586071480614537882000279615338302 997439861010200663079949855541872903043889671708626799031059480866388051 209336591388588367396363093227458894303981710621431746755275356074750526 356980904274936306264989347149757055327029638608033412059987464445146652 823194792363678794508359104005439026527642323366387247592079033225998527 673580062054165915296305429098203287043015490268770159681408946954004030 833019082219840421340410314622401992619977925907229767656276606220727892 458264484542062483322960596833388469519084788035162364787445407585839047 001134607347443210781134060098897324172243132333569604734314662810874906 70834920743761125196277816231577311143834409*x^13- 367387313485662854313108560960339239918089056647951044084990517410323033 458989291624001543622364856743627549208933704812861904512695952644041874 950494385038444124441733091459208645387839548924553938920284142736467093 839647877725690874167663019213168264846911528478749728120891576397237228 972330986409588858647099303308075041563526323191580989985831833605656856 839437388714345294926387652528421782014753289331887390403200060683934143 808301907509139411427123666136182139793329862830630595079375362378851262 359700938329921048108465986603268958524459381108156060898138497592586266 682256229152140428337420969695558883845571459347610867492093834619287035 036507398513075525125692857846509559798512424004609891753588724180629438 194823906662802228267875836614909909015097296463283531035732867237826050 963244685360607172830396279040021453782463064*x^12+ 891192698806037753144038795520866301922674334513376324591826110016462506 273173629241814265394441979854376695750913737179669860923212922948620882 889563271135848378212715281472276586070325847059929548269523037786545521 307519261447922321742785484361958814759646302854149987929235054900111221 616717078580602768635284923960143482627236565057636809084597511182254806 837594832477320030227806935924019118726268604078892002012240155506283349 512787839514150728056408262447853508038792819483528523121019164962203192 521529112779851605942165391303855137685722246047923215859382620360419122 608267018156374964590816625877236397506580174389175983537011263750544678 740404418583087541887622488896123047459452776261751436018858859559218703 911747455177059364378990183291401784130863375145089250439086319505132022 919417831836917707364574511743553559303752240*x^11- 105319388783646416533325003226510819023945700457281165689158632790162123 409252712062098270092484599537215897518627633463503609002796302547570682 788971760945883894490072328722482897204691577224681161884459733378916589 785886785577034716364290887581898448113762700111674726888556227035561114 466050165967934045544998906549433674231059258206314110394735088637263625 400904541093047034401753982172151890424758009989158049280853909883641803 552732367834398857982700493526249265775262197925646407549386144891973525 811209429921213250574843253045108474075794830645306316981268986228060860 869596615664923846072416008587120314878736173713319499429336429885572090 277802563978291088759482350495718951913711180641373750495906622929417645 789510092281435430013948836950593541548198757515043327266282278762626795 2418711675671024374275274829815486168553465600*x^10+ 573438783601621519415879979640613314525381933303759225592269607158815216 059750759663585241241025689932911371141390033483548534198586897834327012 097986738265283424173683746063811235581122996698837393042881097104154441 45954917629459589358239803581602943297368136984083563015052360074140 682900566329250021902867266573463990326839011559745678803689259560206192 05798595872388370303145831726763276455272826834593973092151670707376 841415573906319412953306824404580904920012965822595645173426582145821687 662749238370627450974202287529934147616655724314834677677198147986958827 428782064561210965038831450598703772841384871970006879658032169290069068 766922927664042244821190755607690372126441478474718974500544191516592122 262465475232642253757339667666719671035502646583147110375430962965920828 800830817981826137288473461017053921630368256*x^9- 489140124958681255588632136242294942308745768970063760478808642756534175 211028613047910478144955821308230205366775011065141654526701067971583674 075800017226277384770957180858461038736749647515588076338062429676276189 636750356722150519833856546024520805593368831546479564012561334119558482 942776126073049579839954018471389535740312006441155456979051989029620351 598713449270344808805753552257173400845818534545657379937492775759853644 532111887304661781249764210092282147057367787775172215677298964332009214 40119255