442 |
442 |
return sollya_lib_dirtyinfnorm(funcSo, rangeSo)
|
443 |
443 |
# End pobyso_dirty_inf_norm_so_so
|
444 |
444 |
|
|
445 |
def pobyso_find_zeros_so_so(funcSo, rangeSo):
|
|
446 |
"""
|
|
447 |
Thin wrapper over sollya_lib_findzeros()
|
|
448 |
"""
|
|
449 |
return sollya_lib_findzeros(funcSo, rangeSo)
|
|
450 |
# End pobys_find_zeros
|
|
451 |
|
445 |
452 |
def pobyso_float_list_so_sa(listSo):
|
446 |
453 |
"""
|
447 |
454 |
Return a Sollya list of floating-point numbers as a Sage list of
|
... | ... | |
1466 |
1473 |
return rangeSo
|
1467 |
1474 |
# End pobyso_range_from_bounds_sa_so
|
1468 |
1475 |
|
|
1476 |
def pobyso_range_list_so_sa(listSo):
|
|
1477 |
"""
|
|
1478 |
Return a Sollya list of ranges as a Sage list of
|
|
1479 |
floating-point intervals.
|
|
1480 |
"""
|
|
1481 |
listSa = []
|
|
1482 |
## The function returns none if the list is empty or an error has happened.
|
|
1483 |
retVal = pobyso_get_list_elements_so_so(listSo)
|
|
1484 |
if retVal is None:
|
|
1485 |
return listSa
|
|
1486 |
## Just in case the interface is changed and an empty list is returned
|
|
1487 |
# instead of None.
|
|
1488 |
elif len(retVal) == 0:
|
|
1489 |
return listSa
|
|
1490 |
else:
|
|
1491 |
## Remember pobyso_get_list_elements_so_so returns more information
|
|
1492 |
# than just the elements of the list (# elements, is_elliptic)
|
|
1493 |
listSaSo, numElements, isEndElliptic = retVal
|
|
1494 |
## Return an empty list.
|
|
1495 |
if numElements == 0:
|
|
1496 |
return listSa
|
|
1497 |
## Search first for the maximum precision of the elements
|
|
1498 |
maxPrecSa = 0
|
|
1499 |
for rangeSo in listSaSo:
|
|
1500 |
#pobyso_autoprint(floatSo)
|
|
1501 |
curPrecSa = pobyso_get_prec_of_range_so_sa(rangeSo)
|
|
1502 |
if curPrecSa > maxPrecSa:
|
|
1503 |
maxPrecSa = curPrecSa
|
|
1504 |
##
|
|
1505 |
intervalField = RealIntervalField(maxPrecSa)
|
|
1506 |
##
|
|
1507 |
for rangeSo in listSaSo:
|
|
1508 |
listSa.append(pobyso_range_to_interval_so_sa(rangeSo, intervalField))
|
|
1509 |
return listSa
|
|
1510 |
# End pobyso_range_list_so_sa
|
|
1511 |
|
1469 |
1512 |
def pobyso_range_max_abs_so_so(rangeSo):
|
1470 |
1513 |
"""
|
1471 |
1514 |
Return, as Sollya constant, the maximum absolute value of a Sollay range.
|